Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Libgdx internationalization

I wonder where do I put my Bundle file for internationalization. The Libgdx wiki doesn't explain where (Android assets folder?) and they use as example the name of file called MyBundle. May I use another name? My apologize for my naivety.

like image 677
Jazzguy Avatar asked Mar 23 '26 10:03

Jazzguy


1 Answers

First argument of I18NBundle constructor is a FileHandle instance. That's mean that you are not limited by one specific folder. See this wiki entry on file handling in libGDX. I suppose you use sample from official wiki and it has this line:

FileHandle baseFileHandle = Gdx.files.internal("i18n/MyBundle");

In this particular case, when we use Gdx.files.internal, bundle must be located in Android project's assets folder. There is no restrictions on file name also.

like image 145
Alexander Mironov Avatar answered Mar 25 '26 14:03

Alexander Mironov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!