Please find enclosed the multi-language support for krpano viewer.
You can check it when downloading the demotour-corfu-i18n.zip and unzip it in the ..krpano/viewer/examples/ folder
It creates the subfolder ..krpano/viewer/examples/demotour-corfu-i18n
When starting the demotour-corfu-i18n/index.html file you can see the original demotour-corfu virtual tour available in 4(3) languages (en, en-US, de, sk). The language selector is among the krpano buttons and in the context menu, too.
Features:
- krpano viewer translated (contextmenu, skins, tooltips, VR menus) without change of original code;
- no need to mark strings in advance;
- no need to create a master list;
- possible to add a new language version to the existing krpano virtual tour;
- possible to enhance with the next language without performance overhead;
- language specific code enhancement;
- you can reuse one phrase on multiple places;
- you can set the language from outside of the krpano viewer using initvars:{i18n_lang:"de"}
- scene/hotspot title change without changing the original xml file;
How to use it:
- add i18n folder to your vtour folder;
- add <include url="i18n.xml" /> into your tour.xml (at the end);
- start your tour.html with initvars:{i18n_lang:"de"} in the embedpano or in the starting URL add the parameter ?initvars.i18n_lang=de
- edit your language dictionary with your translation.
Files in the i18n folder:
i18n.xml for includes and language selector code;
i18n.vskin.xml enhances skin\vtourskin.xml with i18n skin and functionality;
i18n__.xml set your scene and hotspot titles with the language dictionary fields;
i18n__en.xml, i18n__en-US.xml, i18n__de.xml... are placeholders for a particular language dictionary;
please note, that the English is my coding language, so the i18n__en.xml has just reset task.
The i18n__en-US.xml is a language enhancement when different from basic (e.g. pt and pt-BR).
The German i18n__de.xml dictionary has English texts from the code as a comment. When you can translate it into your language and append to the post, we can expand krpano.
/flags/ is for language/country flag images;
The i18n does not support locale date, plurals, number, units available via Javascript and browser support.
The running example with some more features is here:
http://pavel.ursiny.sk/pano/at/Millst…rs.i18n_lang=en
If you like it and want to have it in your language let me know. I can upload your translation there.
Have a great internationalization!
Pavel
I uploaded the update for 1.19pr13. The dynamic skin selector works, too.