generaltranslation 2.0.33 → 2.0.34
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +19 -19
- package/dist/index.js +19 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -82,44 +82,44 @@ declare class GT {
|
|
82
82
|
}
|
83
83
|
export default GT;
|
84
84
|
/**
|
85
|
-
* Gets the writing direction for a given language code.
|
86
|
-
* @param {string} languageCode - The language code to check.
|
87
|
-
* @returns {string} The language direction ('ltr' or 'rtl').
|
85
|
+
* Gets the writing direction for a given BCP 47 language code.
|
86
|
+
* @param {string} languageCode - The BCP 47 language code to check.
|
87
|
+
* @returns {string} The language direction ('ltr' for left-to-right or 'rtl' for right-to-left).
|
88
88
|
*/
|
89
89
|
export declare const getLanguageDirection: typeof _getLanguageDirection;
|
90
90
|
/**
|
91
|
-
* Checks if a given language code is valid.
|
92
|
-
* @param {string} code - The language code to validate.
|
93
|
-
* @returns {boolean} True if the code is valid, false otherwise.
|
91
|
+
* Checks if a given BCP 47 language code is valid.
|
92
|
+
* @param {string} code - The BCP 47 language code to validate.
|
93
|
+
* @returns {boolean} True if the BCP 47 code is valid, false otherwise.
|
94
94
|
*/
|
95
95
|
export declare const isValidLanguageCode: typeof _isValidLanguageCode;
|
96
96
|
/**
|
97
|
-
* Standardizes a language code to ensure correct formatting.
|
98
|
-
* @param {string} code - The language code to standardize.
|
99
|
-
* @returns {string} The standardized language code.
|
97
|
+
* Standardizes a BCP 47 language code to ensure correct formatting.
|
98
|
+
* @param {string} code - The BCP 47 language code to standardize.
|
99
|
+
* @returns {string} The standardized BCP 47 language code.
|
100
100
|
*/
|
101
101
|
export declare const standardizeLanguageCode: typeof _standardizeLanguageCode;
|
102
102
|
/**
|
103
|
-
* Gets a language object from a language code.
|
104
|
-
* @param {string|string[]} codes - The language code(s) to convert.
|
105
|
-
* @returns {LanguageObject|null|(LanguageObject|null)[]} The language object(s) or null if invalid.
|
103
|
+
* Gets a language object from a BCP 47 language code.
|
104
|
+
* @param {string|string[]} codes - The BCP 47 language code(s) to convert.
|
105
|
+
* @returns {LanguageObject|null|(LanguageObject|null)[]} The language object(s) or null if the BCP 47 code is invalid.
|
106
106
|
*/
|
107
107
|
export declare const getLanguageObject: typeof _getLanguageObject;
|
108
108
|
/**
|
109
|
-
* Gets a language code from a language name.
|
109
|
+
* Gets a BCP 47 language code from a language name.
|
110
110
|
* @param {string|string[]} languages - The language name(s) to convert.
|
111
|
-
* @returns {string|string[]} The corresponding language code(s).
|
111
|
+
* @returns {string|string[]} The corresponding BCP 47 language code(s).
|
112
112
|
*/
|
113
113
|
export declare const getLanguageCode: (languages: string | string[]) => string | string[];
|
114
114
|
/**
|
115
|
-
* Gets a language name from a language code.
|
116
|
-
* @param {string|string[]} codes - The language code(s) to convert.
|
115
|
+
* Gets a language name from a BCP 47 language code.
|
116
|
+
* @param {string|string[]} codes - The BCP 47 language code(s) to convert.
|
117
117
|
* @returns {string|string[]} The corresponding language name(s).
|
118
118
|
*/
|
119
119
|
export declare const getLanguageName: (codes: string | string[]) => string | string[];
|
120
120
|
/**
|
121
|
-
* Checks if multiple language codes represent the same language.
|
122
|
-
* @param {...string|string[]} codes - The language codes to compare.
|
123
|
-
* @returns {boolean} True if all codes represent the same language, false otherwise.
|
121
|
+
* Checks if multiple BCP 47 language codes represent the same language.
|
122
|
+
* @param {...string|string[]} codes - The BCP 47 language codes to compare.
|
123
|
+
* @returns {boolean} True if all BCP 47 codes represent the same language, false otherwise.
|
124
124
|
*/
|
125
125
|
export declare const isSameLanguage: typeof _isSameLanguage;
|
package/dist/index.js
CHANGED
@@ -104,44 +104,44 @@ class GT {
|
|
104
104
|
exports.default = GT;
|
105
105
|
// Export the functions
|
106
106
|
/**
|
107
|
-
* Gets the writing direction for a given language code.
|
108
|
-
* @param {string} languageCode - The language code to check.
|
109
|
-
* @returns {string} The language direction ('ltr' or 'rtl').
|
107
|
+
* Gets the writing direction for a given BCP 47 language code.
|
108
|
+
* @param {string} languageCode - The BCP 47 language code to check.
|
109
|
+
* @returns {string} The language direction ('ltr' for left-to-right or 'rtl' for right-to-left).
|
110
110
|
*/
|
111
111
|
exports.getLanguageDirection = getLanguageDirection_1.default;
|
112
112
|
/**
|
113
|
-
* Checks if a given language code is valid.
|
114
|
-
* @param {string} code - The language code to validate.
|
115
|
-
* @returns {boolean} True if the code is valid, false otherwise.
|
113
|
+
* Checks if a given BCP 47 language code is valid.
|
114
|
+
* @param {string} code - The BCP 47 language code to validate.
|
115
|
+
* @returns {boolean} True if the BCP 47 code is valid, false otherwise.
|
116
116
|
*/
|
117
117
|
exports.isValidLanguageCode = codes_1._isValidLanguageCode;
|
118
118
|
/**
|
119
|
-
* Standardizes a language code to ensure correct formatting.
|
120
|
-
* @param {string} code - The language code to standardize.
|
121
|
-
* @returns {string} The standardized language code.
|
119
|
+
* Standardizes a BCP 47 language code to ensure correct formatting.
|
120
|
+
* @param {string} code - The BCP 47 language code to standardize.
|
121
|
+
* @returns {string} The standardized BCP 47 language code.
|
122
122
|
*/
|
123
123
|
exports.standardizeLanguageCode = codes_1._standardizeLanguageCode;
|
124
124
|
/**
|
125
|
-
* Gets a language object from a language code.
|
126
|
-
* @param {string|string[]} codes - The language code(s) to convert.
|
127
|
-
* @returns {LanguageObject|null|(LanguageObject|null)[]} The language object(s) or null if invalid.
|
125
|
+
* Gets a language object from a BCP 47 language code.
|
126
|
+
* @param {string|string[]} codes - The BCP 47 language code(s) to convert.
|
127
|
+
* @returns {LanguageObject|null|(LanguageObject|null)[]} The language object(s) or null if the BCP 47 code is invalid.
|
128
128
|
*/
|
129
129
|
exports.getLanguageObject = codes_1._getLanguageObject;
|
130
130
|
/**
|
131
|
-
* Gets a language code from a language name.
|
131
|
+
* Gets a BCP 47 language code from a language name.
|
132
132
|
* @param {string|string[]} languages - The language name(s) to convert.
|
133
|
-
* @returns {string|string[]} The corresponding language code(s).
|
133
|
+
* @returns {string|string[]} The corresponding BCP 47 language code(s).
|
134
134
|
*/
|
135
135
|
exports.getLanguageCode = codes_1._getLanguageCode;
|
136
136
|
/**
|
137
|
-
* Gets a language name from a language code.
|
138
|
-
* @param {string|string[]} codes - The language code(s) to convert.
|
137
|
+
* Gets a language name from a BCP 47 language code.
|
138
|
+
* @param {string|string[]} codes - The BCP 47 language code(s) to convert.
|
139
139
|
* @returns {string|string[]} The corresponding language name(s).
|
140
140
|
*/
|
141
141
|
exports.getLanguageName = codes_1._getLanguageName;
|
142
142
|
/**
|
143
|
-
* Checks if multiple language codes represent the same language.
|
144
|
-
* @param {...string|string[]} codes - The language codes to compare.
|
145
|
-
* @returns {boolean} True if all codes represent the same language, false otherwise.
|
143
|
+
* Checks if multiple BCP 47 language codes represent the same language.
|
144
|
+
* @param {...string|string[]} codes - The BCP 47 language codes to compare.
|
145
|
+
* @returns {boolean} True if all BCP 47 codes represent the same language, false otherwise.
|
146
146
|
*/
|
147
147
|
exports.isSameLanguage = codes_1._isSameLanguage;
|