How to do "Internationalization" in Cocos2D-X ?

How to do "Internationalization" in Cocos2D-X ?
0.0 0


Please answer these questions to help fix this issue:
What’s the issue? I want to do “Internationalization” in Cocos2D-X
What’s the engine version? 3.0rc1


I am new to Cocos2D-X, I’d like to know how to do “Internationalization” (Texts in English, Chinese, French, Japanese, etc) in Cocos2D-X.

I know how to do “Internationalization” in Android, IOS. Is there a way to do internationalization in Cocos2D-X directly or should I do internationalization for each platform (IOS, Android, Winphone, etc) I publish the App to ?

Could anyone help me ?
Thank you very much.

Best regards
Enming XIE


I just read in my strings from a file that is a key/value setup. One file for each language, keys are obviously the same.


Use .mo files

In your code you write

CCLog("%s",tr(“This is english text”);

Thanks to macro tr and .po files (google “po editors”) and this simple lib:

it is really simple


Thanks a lot for all the responses. I will try and let you know.:wink: :wink: