Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Added Dutch and Ukrainian languages
Browse files Browse the repository at this point in the history
  • Loading branch information
folomeev committed Mar 9, 2017
1 parent 49c8ab8 commit 65929c3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
21 changes: 17 additions & 4 deletions libai/src/main/java/ai/api/AIConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,23 @@ String getContextsUrl(final String sessionId, final String suffix) {
* Currently supported languages
*/
public static enum SupportedLanguages {
English("en"), EnglishUS("en-US", "en"), EnglishGB("en-GB", "en"), Russian("ru"), German(
"de"), Portuguese("pt"), PortugueseBrazil("pt-BR"), Spanish("es"), French("fr"), Italian(
"it"), Japanese("ja"), Korean(
"ko"), ChineseChina("zh-CN"), ChineseHongKong("zh-HK"), ChineseTaiwan("zh-TW");
ChineseChina("zh-CN"),
ChineseHongKong("zh-HK"),
ChineseTaiwan("zh-TW"),
English("en"),
EnglishUS("en-US", "en"),
EnglishGB("en-GB", "en"),
Dutch("nl"),
French("fr"),
German("de"),
Italian("it"),
Japanese("ja"),
Korean("ko"),
Portuguese("pt"),
PortugueseBrazil("pt-BR"),
Russian("ru"),
Spanish("es"),
Ukrainian("uk");

/**
* Default language value
Expand Down
2 changes: 2 additions & 0 deletions libai/src/test/java/ai/api/AIConfigurationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public void testSupportedLanguage() {
assertEquals(SupportedLanguages.DEFAULT, SupportedLanguages.fromLanguageTag(null));
assertEquals(SupportedLanguages.DEFAULT, SupportedLanguages.fromLanguageTag(""));
assertEquals(SupportedLanguages.DEFAULT, SupportedLanguages.fromLanguageTag("uu-UU"));
assertEquals(SupportedLanguages.Dutch, SupportedLanguages.fromLanguageTag("nl"));
assertEquals(SupportedLanguages.Ukrainian, SupportedLanguages.fromLanguageTag("uk"));
}

@Test(expected=IllegalArgumentException.class)
Expand Down

0 comments on commit 65929c3

Please sign in to comment.