EddyVerbruggen / nativescript-localize

Internationalization plugin for NativeScript using native capabilities of each platform
MIT License
79 stars 31 forks source link

add translations for plugins #49

Closed martijnkooijman closed 5 years ago

martijnkooijman commented 6 years ago

Hi, We have a plugin in our app that has needs several resources to be in the strings file in the android values directory. It would be nice if it was possible to add multiple strings to the resource file have a base resource file that will be appended by your plugin. Because if we add them to the i18n file the postfix will be added to the names and they will not be recognized by our plugin.

Thanks in advance

lfabreges commented 5 years ago

You could probably try to append the strings in a custom hook. Let me know if that works for you.

lfabreges commented 5 years ago

Simple keys matching ^[_a-zA-Z]\w*$ are no longer being encoded in the last version of the plugin. The regular expression could be further tuned to match any valid iOS and Android key but I won't do it myself. Anyway, it may be enough for your use case.