generaltranslation 6.3.0 → 6.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs.min.cjs.map +1 -1
- package/dist/index.d.ts +37 -37
- package/dist/index.esm.min.mjs.map +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -65,11 +65,11 @@ declare class GT {
|
|
65
65
|
*/
|
66
66
|
translateIcu(source: string, locale: string, metadata?: Metadata): Promise<IcuTranslationResult | TranslationError>;
|
67
67
|
/**
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
68
|
+
* Retrieves the display name of locale code using Intl.DisplayNames.
|
69
|
+
*
|
70
|
+
* @param {string} locale - A BCP-47 locale code.
|
71
|
+
* @returns {string} The display name corresponding to the code.
|
72
|
+
*/
|
73
73
|
getLocaleName(locale: string): string;
|
74
74
|
/**
|
75
75
|
* Retrieves an emoji based on a given locale code, taking into account region, language, and specific exceptions.
|
@@ -77,40 +77,40 @@ declare class GT {
|
|
77
77
|
*
|
78
78
|
* @param locale - A string representing the locale code (e.g., 'en-US', 'fr-CA').
|
79
79
|
* @returns The emoji representing the locale or its region, or a default emoji if no specific match is found.
|
80
|
-
|
80
|
+
*/
|
81
81
|
getLocaleEmoji(locale: string): string;
|
82
82
|
/**
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
83
|
+
* Generates linguistic details for a given locale code.
|
84
|
+
*
|
85
|
+
* This function returns information about the locale,
|
86
|
+
* script, and region of a given language code both in a standard form and in a maximized form (with likely script and region).
|
87
|
+
* The function provides these names in both your default language and native forms, and an associated emoji.
|
88
|
+
*
|
89
|
+
* @param {string} locale - The locale code to get properties for (e.g., "de-AT").
|
90
|
+
* @returns {LocaleProperties} - An object containing detailed information about the locale.
|
91
|
+
*
|
92
|
+
* @property {string} code - The full locale code, e.g., "de-AT".
|
93
|
+
* @property {string} name - Language name in the default display language, e.g., "Austrian German".
|
94
|
+
* @property {string} nativeName - Language name in the locale's native language, e.g., "Österreichisches Deutsch".
|
95
|
+
* @property {string} languageCode - The base language code, e.g., "de".
|
96
|
+
* @property {string} languageName - The language name in the default display language, e.g., "German".
|
97
|
+
* @property {string} nativeLanguageName - The language name in the native language, e.g., "Deutsch".
|
98
|
+
* @property {string} nameWithRegionCode - Language name with region in the default language, e.g., "German (AT)".
|
99
|
+
* @property {string} nativeNameWithRegionCode - Language name with region in the native language, e.g., "Deutsch (AT)".
|
100
|
+
* @property {string} regionCode - The region code from maximization, e.g., "AT".
|
101
|
+
* @property {string} regionName - The region name in the default display language, e.g., "Austria".
|
102
|
+
* @property {string} nativeRegionName - The region name in the native language, e.g., "Österreich".
|
103
|
+
* @property {string} scriptCode - The script code from maximization, e.g., "Latn".
|
104
|
+
* @property {string} scriptName - The script name in the default display language, e.g., "Latin".
|
105
|
+
* @property {string} nativeScriptName - The script name in the native language, e.g., "Lateinisch".
|
106
|
+
* @property {string} maximizedCode - The maximized locale code, e.g., "de-Latn-AT".
|
107
|
+
* @property {string} maximizedName - Maximized locale name with likely script in the default language, e.g., "Austrian German (Latin)".
|
108
|
+
* @property {string} nativeMaximizedName - Maximized locale name in the native language, e.g., "Österreichisches Deutsch (Lateinisch)".
|
109
|
+
* @property {string} minimizedCode - Minimized locale code, e.g., "de-AT" (or "de" for "de-DE").
|
110
|
+
* @property {string} minimizedName - Minimized language name in the default language, e.g., "Austrian German".
|
111
|
+
* @property {string} nativeMinimizedName - Minimized language name in the native language, e.g., "Österreichisches Deutsch".
|
112
|
+
* @property {string} emoji - The emoji associated with the locale's region, if applicable.
|
113
|
+
*/
|
114
114
|
getLocaleProperties(locale: string): LocaleProperties;
|
115
115
|
}
|
116
116
|
/**
|