Libgdx i18nbundle работает только корневой пакет - PullRequest
0 голосов
/ 28 июня 2018

Английский не мой родной язык. В мобильном i18nbundle получают только корневой пакет (BlueStacks аналогично). Код:

Locale locale = new Locale("eng");
I18NBundle myBundle = I18NBundle.createBundle(Gdx.files.internal("Text/Text"), locale);
TextButton textButton = new TextButton(myBundle.format("testText"),skin)

У меня есть: "Text.properties" и "Text_eng.properties", но работает только "Text.properties". Все отлично работают в ИДЕИ. Мобильный: JiaYu G4, API - 17

Изменить на код:

Locale locale = new Locale("eng","Test","Test");
I18NBundle myBundle = I18NBundle.createBundle(Gdx.files.internal("Text/Text"), locale);
TextButton textButton = new TextButton(myBundle.format("testText"),skin)

Теперь загрузите на ПК «Text_eng_Test_Test.properties». На мобильном телефоне "Text_eng_Test.properties".

...