LibGDX uses .properties files to handle localization. If you do not know the basic of localization in LigGDX, you should look at Internationalization and Localization at LibGDX wiki first.
In Android Studio at your assets directory:
- right click --> New --> Resources Bundle
- In "Resource bundle base name, type "MyBundle_zh.properties", zh can be change to the language you want to use.
- Click "OK"
Ok, so now to display, let's say the "game", you use:game=我的超級酷遊戲 newMission={0}, 你有一個任務,到達第{1}關 coveredPath=你已包含 {0,number}% 的路 highScoreTime=最高分數在{0,date} 時間 {0,time} 達到
String text = bundle.get("game");First you need to create the .fnt files for your language in Hiero. The way I open Hiero is to download here and open it.
Then choose your language font, in sample text just paste all the characters in it like below:
and then File --> Save Bitmap Font files to your assets directory. It will save a .fnt file and .png file.
Next thing you need to set the encoding in your I18Bundle. For Traditional Chinese the encoding is "big5" like this:
public void setLanguage() {
	Locale locale = Locale.getDefault(); //This will get default language of the device
	String encoding = "utf-8"
	if (locale.getLanguage().equals("zh")) {
	    encoding = "big5";
	    Texture texture = new Texture(Gdx.files.internal("fonts/chinese.png"));
            texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
            font = new BitmapFont(Gdx.files.internal("fonts/chinese.fnt"), new TextureRegion(texture), false);
	} else {
	    Texture texture = new Texture(Gdx.files.internal("fonts/english.png"));
            texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
            font = new BitmapFont(Gdx.files.internal("fonts/english.fnt"), new TextureRegion(texture), false);
	}
	bundle = I18NBundle.createBundle(Gdx.files.internal("i18n/MyBundle"), locale, encoding);
}
Now everything should work properly. One more thing your computer language setting should also be the same language you are editing MyBundle file and running Hiero otherwise they are in different encoding and will not show properly. So let's say I want to also include Simplified Chinese. I need to set my computer in Simplified Chinese and reboot to do it.
This is simple if you don't have many words. If you make like a Chinese word games I can see it will be a pain to edit in Hiero.
