adding localization

i’ve try to find it in documentation,but not found.
What is correct way to add localization in game?

is possible use plain text or xml file to struct language words?

There no native support for it. But it’s not really a problem (flash has it, but it is too bad). Sure you can use plain text or xml (see TextAsset).

I’ll tell you how it’s done if there are separate game versions, one for each language.
Store all your textures and sounds that need localisation in a separate folder, so you can quickly change them. Create some text manager, that maps string keys to actual text.
In a simple project keys can be just strings (“buttonPlay” → “PLAY”). For something more complex it’s convinient to have “groups”, i.e. group “main_menu”, key “button_play”, text “PLAY”.

You’ll need to think about dynamically generated strings i.e. “task progress: 2 out of 4 done”. In some languages the order of 2 and 4 MUST be reversed, so it’s better to have option to parse strings like “task progress: [2] out of [3] done” in a way like

string taskStr = Loc.GetStr("gamePanel", "task_desc");//that is "task '[1]' progress: [2] out of [3] done"
string parsed = Loc.Parse(taskStr, 2, 4);//"task progress: 2 out of 4 done"