Closed hopewise closed 10 years ago
You need to use "using" instead of "import" to enable mix-in syntax e.g. "Hello".i18n(), it's equivalent to I18n.i18n("Hello"). See http://haxe.org/manual/using for details. rox-i18n works well with StablexUI, here's a real-world example (a snippet from my project):
<Button defaults="'MenuButtons'" text="'remove'.i18n()" />
I am sorry, I found that I have to say 'using' instead of import. Although it compiles now, but the localization didn't happen, text won't change .. I put compilerflag name="--macro com.roxstudio.i18n.I18n.locale('en')"
in my app nmml file, but, the text won't get localized .. only the text in the widget will appear ..
Any idea please?
ops, I am sorry, again its my fault, I have to put the folder next to assets, it was in src folder, thanks again.
Although I put: import com.roxstudio.i18n.I18n;
and in constructor of entry main class:
I18n.init();
and for compilation options:
--macro com.roxstudio.i18n.I18n.locale('en')
I got this error:
ui/index.xml:388: characters 24-36 : String has no field i18n
I am using stablexui, here is how I've used it:
here is my en/strings.xml
Any example please about using it stablexui? Thanks for great work!