Skip to content

Commit ed5b7d4

Browse files
Lucas MathisJanEbbing
authored andcommitted
feat: Add new language codes
1 parent 573aa00 commit ed5b7d4

File tree

2 files changed

+86
-1
lines changed

2 files changed

+86
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Added
9+
- Added new language constants from January 2026 API release of 81 new languages.
10+
811
### Changed
912
- Removed Node 12 from the CI as it broke and is end-of-life.
1013
- Updated our model type tests to expect the `model_type_used` to be populated when the `model_type` is specified in the request

src/types.ts

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,37 +228,118 @@ export interface DocumentTranslateOptions extends BaseRequestOptions {
228228
* API accept case-insensitive language codes.
229229
*/
230230
type CommonLanguageCode =
231+
| 'ace'
232+
| 'af'
233+
| 'an'
231234
| 'ar'
235+
| 'as'
236+
| 'ay'
237+
| 'az'
238+
| 'ba'
239+
| 'be'
232240
| 'bg'
241+
| 'bho'
242+
| 'bn'
243+
| 'br'
244+
| 'bs'
245+
| 'ca'
246+
| 'ceb'
247+
| 'ckb'
233248
| 'cs'
249+
| 'cy'
234250
| 'da'
235251
| 'de'
236252
| 'el'
253+
| 'eo'
237254
| 'es'
238255
| 'et'
256+
| 'eu'
257+
| 'fa'
239258
| 'fi'
240259
| 'fr'
260+
| 'ga'
261+
| 'gl'
262+
| 'gn'
263+
| 'gom'
264+
| 'gu'
265+
| 'ha'
241266
| 'he'
267+
| 'hi'
268+
| 'hr'
269+
| 'ht'
242270
| 'hu'
271+
| 'hy'
243272
| 'id'
273+
| 'ig'
274+
| 'is'
244275
| 'it'
245276
| 'ja'
277+
| 'jv'
278+
| 'ka'
279+
| 'kk'
280+
| 'kmr'
246281
| 'ko'
282+
| 'ky'
283+
| 'la'
284+
| 'lb'
285+
| 'lmo'
286+
| 'ln'
247287
| 'lt'
248288
| 'lv'
289+
| 'mai'
290+
| 'mg'
291+
| 'mi'
292+
| 'mk'
293+
| 'ml'
294+
| 'mn'
295+
| 'mr'
296+
| 'ms'
297+
| 'mt'
298+
| 'my'
249299
| 'nb'
300+
| 'ne'
250301
| 'nl'
302+
| 'oc'
303+
| 'om'
304+
| 'pa'
305+
| 'pag'
306+
| 'pam'
251307
| 'pl'
308+
| 'prs'
309+
| 'ps'
310+
| 'qu'
252311
| 'ro'
253312
| 'ru'
313+
| 'sa'
314+
| 'scn'
254315
| 'sk'
255316
| 'sl'
317+
| 'sq'
318+
| 'sr'
319+
| 'st'
320+
| 'su'
256321
| 'sv'
322+
| 'sw'
323+
| 'ta'
324+
| 'te'
325+
| 'tg'
257326
| 'th'
327+
| 'tk'
328+
| 'tl'
329+
| 'tn'
258330
| 'tr'
331+
| 'ts'
332+
| 'tt'
259333
| 'uk'
334+
| 'ur'
335+
| 'uz'
260336
| 'vi'
261-
| 'zh';
337+
| 'wo'
338+
| 'xh'
339+
| 'yi'
340+
| 'yue'
341+
| 'zh'
342+
| 'zu';
262343

263344
/**
264345
* Language codes that may be used as a source language.
@@ -276,6 +357,7 @@ export type TargetLanguageCode =
276357
| CommonLanguageCode
277358
| 'en-GB'
278359
| 'en-US'
360+
| 'es-419'
279361
| 'pt-BR'
280362
| 'pt-PT'
281363
| 'zh-HANS'

0 commit comments

Comments
 (0)