PocketByte / LocoLaser

Localization tool to import localized strings from external source to your project.
Apache License 2.0
31 stars 1 forks source link

JS Platform #5

Closed galex closed 4 years ago

galex commented 5 years ago

Hello,

Do you plan on supporting JS targets as well?

Regards, Alex

KamiSempai commented 5 years ago

Hello. I'm not so familiar with JS to be sure that will do it in the right way. But I would do it. If you show me how will look JS implementation for following example: https://github.com/PocketByte/locolaser-kotlin-mpp-example, I will try to do it soon as posible.

SimonSchubert commented 5 years ago

It's a cool project, thanks, I might try it out in my android/ios mpp project. And I'm also interested in the js target and even more in the desktop(linux/osx/windows) target.

KamiSempai commented 5 years ago

It's a cool project, thanks, I might try it out in my android/ios mpp project. And I'm also interested in the js target and even more in the desktop(linux/osx/windows) target.

I'm looking on i18next as a JS library for localization. But faced with the problem with plurals. I tried to repeat example from following page https://www.i18next.com/translation-function/plurals#languages-with-multiple-plurals but instead of expected translations I get wrong results https://jsfiddle.net/2ro70evu/

For OSX you could use iOS implementation cause they both use same Framework for localization. Linux and Windows not in plans right now but if you provide clear implementation for them I will implement corresponded code generator.

KamiSempai commented 4 years ago

JS support was implemented here is an example https://github.com/PocketByte/locolaser-kotlin-mpp-example