Skip to content

Commit 0f1ce79

Browse files
Merge pull request #43 from DeepLcom/add.langs
feat: Add all supported languages to source_lang and target_lang specs
2 parents 117100f + 3f6bc66 commit 0f1ce79

3 files changed

Lines changed: 347 additions & 313 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ typos, schema fixes, or adding examples.
2121
* Renamed `SourceDataChunk` and `EndOfSourceData` to `SourceMediaChunk` and `EndOfSourceMedia`
2222
*
2323
* Fixes the usage endpoint response object name. Should be `key_usages` and `key_and_day_usages` instead of `grouped_usage`
24+
* Add all supported languages to Translate API `source_lang` and `target_lang` specs
25+
* Merge redundant `SourceLanguageText` and `TargetLanguageText` schemas into `SourceLanguage` and `TargetLanguage` to eliminate duplication
2426

2527
### Deprecated
2628
* Removed the `openapi_gitbook.yaml` file due to redundancy. Please use `openapi.yaml` going forward

openapi.json

Lines changed: 172 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@
8383
}
8484
},
8585
"source_lang": {
86-
"$ref": "#/components/schemas/SourceLanguageText"
86+
"$ref": "#/components/schemas/SourceLanguage"
8787
},
8888
"target_lang": {
89-
"$ref": "#/components/schemas/TargetLanguageText"
89+
"$ref": "#/components/schemas/TargetLanguage"
9090
},
9191
"context": {
9292
"$ref": "#/components/schemas/Context"
@@ -206,10 +206,10 @@
206206
}
207207
},
208208
"source_lang": {
209-
"$ref": "#/components/schemas/SourceLanguageText"
209+
"$ref": "#/components/schemas/SourceLanguage"
210210
},
211211
"target_lang": {
212-
"$ref": "#/components/schemas/TargetLanguageText"
212+
"$ref": "#/components/schemas/TargetLanguage"
213213
},
214214
"context": {
215215
"$ref": "#/components/schemas/Context"
@@ -5549,78 +5549,122 @@
55495549
},
55505550
"SourceLanguage": {
55515551
"type": "string",
5552-
"description": "Language of the text to be translated. Options currently available:\n * `AR` - Arabic\n * `BG` - Bulgarian\n * `CS` - Czech\n * `DA` - Danish\n * `DE` - German\n * `EL` - Greek\n * `EN` - English\n * `ES` - Spanish\n * `ET` - Estonian\n * `FI` - Finnish\n * `FR` - French\n * `HU` - Hungarian\n * `ID` - Indonesian\n * `IT` - Italian\n * `JA` - Japanese\n * `KO` - Korean\n * `LT` - Lithuanian\n * `LV` - Latvian\n * `NB` - Norwegian (Bokm\u00e5l)\n * `NL` - Dutch\n * `PL` - Polish\n * `PT` - Portuguese (all Portuguese varieties mixed)\n * `RO` - Romanian\n * `RU` - Russian\n * `SK` - Slovak\n * `SL` - Slovenian\n * `SV` - Swedish\n * `TR` - Turkish\n * `UK` - Ukrainian\n * `ZH` - Chinese\n\nIf this parameter is omitted, the API will attempt to detect the language of the text and translate it.",
5553-
"enum": [
5554-
"AR",
5555-
"BG",
5556-
"CS",
5557-
"DA",
5558-
"DE",
5559-
"EL",
5560-
"EN",
5561-
"ES",
5562-
"ET",
5563-
"FI",
5564-
"FR",
5565-
"HU",
5566-
"ID",
5567-
"IT",
5568-
"JA",
5569-
"KO",
5570-
"LT",
5571-
"LV",
5572-
"NB",
5573-
"NL",
5574-
"PL",
5575-
"PT",
5576-
"RO",
5577-
"RU",
5578-
"SK",
5579-
"SL",
5580-
"SV",
5581-
"TR",
5582-
"UK",
5583-
"ZH"
5584-
],
5585-
"example": "EN"
5586-
},
5587-
"SourceLanguageText": {
5588-
"type": "string",
5589-
"description": "Language of the text to be translated. Options currently available:\n * `AR` - Arabic\n * `BG` - Bulgarian\n * `CS` - Czech\n * `DA` - Danish\n * `DE` - German\n * `EL` - Greek\n * `EN` - English\n * `ES` - Spanish\n * `ET` - Estonian\n * `FI` - Finnish\n * `FR` - French\n * `HE` - Hebrew\n * `HU` - Hungarian\n * `ID` - Indonesian\n * `IT` - Italian\n * `JA` - Japanese\n * `KO` - Korean\n * `LT` - Lithuanian\n * `LV` - Latvian\n * `NB` - Norwegian (Bokm\u00e5l)\n * `NL` - Dutch\n * `PL` - Polish\n * `PT` - Portuguese (all Portuguese varieties mixed)\n * `RO` - Romanian\n * `RU` - Russian\n * `SK` - Slovak\n * `SL` - Slovenian\n * `SV` - Swedish\n * `TH` - Thai\n * `TR` - Turkish\n * `UK` - Ukrainian\n * `VI` - Vietnamese\n * `ZH` - Chinese\n\nIf this parameter is omitted, the API will attempt to detect the language of the text and translate it.",
5552+
"description": "Language of the text to be translated. If this parameter is omitted, the API will attempt to detect the language of the text and translate it.\n\n**Note:** Some languages only work with `model_type` set to `quality_optimized`. See [supported languages](https://developers.deepl.com/docs/getting-started/supported-languages) for more details.",
55905553
"enum": [
5554+
"ACE",
5555+
"AF",
5556+
"AN",
55915557
"AR",
5558+
"AS",
5559+
"AY",
5560+
"AZ",
5561+
"BA",
5562+
"BE",
55925563
"BG",
5564+
"BHO",
5565+
"BN",
5566+
"BR",
5567+
"BS",
5568+
"CA",
5569+
"CEB",
5570+
"CKB",
55935571
"CS",
5572+
"CY",
55945573
"DA",
55955574
"DE",
55965575
"EL",
55975576
"EN",
5577+
"EO",
55985578
"ES",
55995579
"ET",
5580+
"EU",
5581+
"FA",
56005582
"FI",
56015583
"FR",
5584+
"GA",
5585+
"GL",
5586+
"GN",
5587+
"GOM",
5588+
"GU",
5589+
"HA",
56025590
"HE",
5591+
"HI",
5592+
"HR",
5593+
"HT",
56035594
"HU",
5595+
"HY",
56045596
"ID",
5597+
"IG",
5598+
"IS",
56055599
"IT",
56065600
"JA",
5601+
"JV",
5602+
"KA",
5603+
"KK",
5604+
"KMR",
56075605
"KO",
5606+
"KY",
5607+
"LA",
5608+
"LB",
5609+
"LMO",
5610+
"LN",
56085611
"LT",
56095612
"LV",
5613+
"MAI",
5614+
"MG",
5615+
"MI",
5616+
"MK",
5617+
"ML",
5618+
"MN",
5619+
"MR",
5620+
"MS",
5621+
"MT",
5622+
"MY",
56105623
"NB",
5624+
"NE",
56115625
"NL",
5626+
"OC",
5627+
"OM",
5628+
"PA",
5629+
"PAG",
5630+
"PAM",
56125631
"PL",
5632+
"PRS",
5633+
"PS",
56135634
"PT",
5635+
"QU",
56145636
"RO",
56155637
"RU",
5638+
"SA",
5639+
"SCN",
56165640
"SK",
56175641
"SL",
5642+
"SQ",
5643+
"SR",
5644+
"ST",
5645+
"SU",
56185646
"SV",
5647+
"SW",
5648+
"TA",
5649+
"TE",
5650+
"TG",
56195651
"TH",
5652+
"TK",
5653+
"TL",
5654+
"TN",
56205655
"TR",
5656+
"TS",
5657+
"TT",
56215658
"UK",
5659+
"UR",
5660+
"UZ",
56225661
"VI",
5623-
"ZH"
5662+
"WO",
5663+
"XH",
5664+
"YI",
5665+
"YUE",
5666+
"ZH",
5667+
"ZU"
56245668
],
56255669
"example": "EN"
56265670
},
@@ -5799,88 +5843,129 @@
57995843
},
58005844
"TargetLanguage": {
58015845
"type": "string",
5802-
"description": "The language into which the text should be translated. Options currently available:\n * `AR` - Arabic\n * `BG` - Bulgarian\n * `CS` - Czech\n * `DA` - Danish\n * `DE` - German\n * `EL` - Greek\n * `EN` - English (unspecified variant for backward compatibility; please select `EN-GB` or `EN-US` instead)\n * `EN-GB` - English (British)\n * `EN-US` - English (American)\n * `ES` - Spanish\n * `ES-419` - Spanish (Latin American)\n * `ET` - Estonian\n * `FI` - Finnish\n * `FR` - French\n * `HU` - Hungarian\n * `ID` - Indonesian\n * `IT` - Italian\n * `JA` - Japanese\n * `KO` - Korean\n * `LT` - Lithuanian\n * `LV` - Latvian\n * `NB` - Norwegian (Bokm\u00e5l)\n * `NL` - Dutch\n * `PL` - Polish\n * `PT` - Portuguese (unspecified variant for backward compatibility; please select `PT-BR` or `PT-PT` instead)\n * `PT-BR` - Portuguese (Brazilian)\n * `PT-PT` - Portuguese (all Portuguese varieties excluding Brazilian Portuguese)\n * `RO` - Romanian\n * `RU` - Russian\n * `SK` - Slovak\n * `SL` - Slovenian\n * `SV` - Swedish\n * `TR` - Turkish\n * `UK` - Ukrainian\n * `ZH` - Chinese (unspecified variant for backward compatibility; please select `ZH-HANS` instead)\n * `ZH-HANS` - Chinese (simplified)\n * `ZH-HANT` - Chinese (traditional)",
5803-
"enum": [
5804-
"AR",
5805-
"BG",
5806-
"CS",
5807-
"DA",
5808-
"DE",
5809-
"EL",
5810-
"EN-GB",
5811-
"EN-US",
5812-
"ES",
5813-
"ES-419",
5814-
"ET",
5815-
"FI",
5816-
"FR",
5817-
"HU",
5818-
"ID",
5819-
"IT",
5820-
"JA",
5821-
"KO",
5822-
"LT",
5823-
"LV",
5824-
"NB",
5825-
"NL",
5826-
"PL",
5827-
"PT-BR",
5828-
"PT-PT",
5829-
"RO",
5830-
"RU",
5831-
"SK",
5832-
"SL",
5833-
"SV",
5834-
"TR",
5835-
"UK",
5836-
"ZH",
5837-
"ZH-HANS",
5838-
"ZH-HANT"
5839-
],
5840-
"example": "DE"
5841-
},
5842-
"TargetLanguageText": {
5843-
"type": "string",
5844-
"description": "The language into which the text should be translated. Options currently available:\n * `AR` - Arabic\n * `BG` - Bulgarian\n * `CS` - Czech\n * `DA` - Danish\n * `DE` - German\n * `EL` - Greek\n * `EN` - English (unspecified variant for backward compatibility; please select `EN-GB` or `EN-US` instead)\n * `EN-GB` - English (British)\n * `EN-US` - English (American)\n * `ES` - Spanish\n * `ES-419` - Spanish (Latin American)\n * `ET` - Estonian\n * `FI` - Finnish\n * `FR` - French\n * `HE` - Hebrew\n * `HU` - Hungarian\n * `ID` - Indonesian\n * `IT` - Italian\n * `JA` - Japanese\n * `KO` - Korean\n * `LT` - Lithuanian\n * `LV` - Latvian\n * `NB` - Norwegian (Bokm\u00e5l)\n * `NL` - Dutch\n * `PL` - Polish\n * `PT` - Portuguese (unspecified variant for backward compatibility; please select `PT-BR` or `PT-PT` instead)\n * `PT-BR` - Portuguese (Brazilian)\n * `PT-PT` - Portuguese (all Portuguese variants excluding Brazilian Portuguese)\n * `RO` - Romanian\n * `RU` - Russian\n * `SK` - Slovak\n * `SL` - Slovenian\n * `SV` - Swedish\n * `TH` - Thai\n * `TR` - Turkish\n * `UK` - Ukrainian\n * `VI` - Vietnamese\n * `ZH` - Chinese (unspecified variant for backward compatibility; please select `ZH-HANS` or `ZH-HANT` instead)\n * `ZH-HANS` - Chinese (simplified)\n * `ZH-HANT` - Chinese (traditional)",
5846+
"description": "The language into which the text should be translated.\n\n**Note:** Some languages only work with `model_type` set to `quality_optimized`. See [supported languages](https://developers.deepl.com/docs/getting-started/supported-languages) for more details.",
58455847
"enum": [
5848+
"ACE",
5849+
"AF",
5850+
"AN",
58465851
"AR",
5852+
"AS",
5853+
"AY",
5854+
"AZ",
5855+
"BA",
5856+
"BE",
58475857
"BG",
5858+
"BHO",
5859+
"BN",
5860+
"BR",
5861+
"BS",
5862+
"CA",
5863+
"CEB",
5864+
"CKB",
58485865
"CS",
5866+
"CY",
58495867
"DA",
58505868
"DE",
58515869
"EL",
5870+
"EN",
58525871
"EN-GB",
58535872
"EN-US",
5873+
"EO",
58545874
"ES",
58555875
"ES-419",
58565876
"ET",
5877+
"EU",
5878+
"FA",
58575879
"FI",
58585880
"FR",
5881+
"GA",
5882+
"GL",
5883+
"GN",
5884+
"GOM",
5885+
"GU",
5886+
"HA",
58595887
"HE",
5888+
"HI",
5889+
"HR",
5890+
"HT",
58605891
"HU",
5892+
"HY",
58615893
"ID",
5894+
"IG",
5895+
"IS",
58625896
"IT",
58635897
"JA",
5898+
"JV",
5899+
"KA",
5900+
"KK",
5901+
"KMR",
58645902
"KO",
5903+
"KY",
5904+
"LA",
5905+
"LB",
5906+
"LMO",
5907+
"LN",
58655908
"LT",
58665909
"LV",
5910+
"MAI",
5911+
"MG",
5912+
"MI",
5913+
"MK",
5914+
"ML",
5915+
"MN",
5916+
"MR",
5917+
"MS",
5918+
"MT",
5919+
"MY",
58675920
"NB",
5921+
"NE",
58685922
"NL",
5923+
"OC",
5924+
"OM",
5925+
"PA",
5926+
"PAG",
5927+
"PAM",
58695928
"PL",
5929+
"PRS",
5930+
"PS",
5931+
"PT",
58705932
"PT-BR",
58715933
"PT-PT",
5934+
"QU",
58725935
"RO",
58735936
"RU",
5937+
"SA",
5938+
"SCN",
58745939
"SK",
58755940
"SL",
5941+
"SQ",
5942+
"SR",
5943+
"ST",
5944+
"SU",
58765945
"SV",
5946+
"SW",
5947+
"TA",
5948+
"TE",
5949+
"TG",
58775950
"TH",
5951+
"TK",
5952+
"TL",
5953+
"TN",
58785954
"TR",
5955+
"TS",
5956+
"TT",
58795957
"UK",
5958+
"UR",
5959+
"UZ",
58805960
"VI",
5961+
"WO",
5962+
"XH",
5963+
"YI",
5964+
"YUE",
58815965
"ZH",
58825966
"ZH-HANS",
5883-
"ZH-HANT"
5967+
"ZH-HANT",
5968+
"ZU"
58845969
],
58855970
"example": "DE"
58865971
},

0 commit comments

Comments
 (0)