rockswang / haxe-i18n

Macro driven internationalization/localization toolkit for Haxe
24 stars 4 forks source link

Does it work on html5? #7

Open hopewise opened 7 years ago

hopewise commented 7 years ago

I am trying to use this library in html5 target, in openFL project, but strings are not localized. Is there a flag to use when compiling? do the xml locale files get copied into Export folder?

I used macro in the xml build file like this:

<compilerflag name="--macro com.roxstudio.i18n.I18n.locale('zh')" />

Can you please help?

hopewise commented 7 years ago

I am sorry, it was an issue with my code, however, I still can't have it to work in html5, I get this error: Constant string expected if I try to use it on variables, however, it works well if I used on Strings directly..