Skip to content

Commit e37b322

Browse files
committed
feat: Add arabic language code and tests
1 parent 7e34c67 commit e37b322

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77

88
## Unreleased
9+
### Added
10+
* New language available: Arabic (MSA) (`'ar'`). Add language code constants and tests.
11+
12+
Note: older library versions also support the new language, this update only
13+
adds new code constants.
914
### Fixed
1015
* Change document upload to use the path `/v2/document` instead of `/v2/document/` (no trailing `/`).
1116
Both paths will continue to work in the v2 version of the API, but `/v2/document` is the intended one.

deepl-java/src/main/java/com/deepl/api/LanguageCode.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
* Translator#getSourceLanguages()} and {@link Translator#getTargetLanguages()}.
1212
*/
1313
public class LanguageCode {
14+
/** Arabic (MSA) language code, may be used as source or target language */
15+
public static final String Arabic = "ar";
16+
1417
/** Bulgarian language code, may be used as source or target language. */
1518
public static final String Bulgarian = "bg";
1619

deepl-java/src/test/java/com/deepl/api/TestBase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class TestBase {
4848
}
4949

5050
exampleText = new HashMap<>();
51+
exampleText.put("ar", "شعاع البروتون");
5152
exampleText.put("bg", "протонен лъч");
5253
exampleText.put("cs", "protonový paprsek");
5354
exampleText.put("da", "protonstråle");

0 commit comments

Comments
 (0)