-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom resource path #28
Comments
@vbresults could you give me more details on what you need? thank you |
@rborn source path is hardcoded to app/i18n This suggestion is to amend this, so that while by default it is still app/i18n, it can be changed, like so: require("nativescript-i18n")({
path: "resources/i18n"
});
// searches 'app/resources/i18n' for source strings instead of 'app/i18n' |
@vbresults Not sure how to achieve this, there is a before-build hook that creates the iOS strings before the app it's built, so we need to know beforehand the path of the files :( A way would be to try to set something in package.json but I'm not sure if this approach it's good and/or possible. |
@vbresults please have a look in the custom_lang_path branch. To set the custom path you need to alter your project's Keep in mind that the new path is relative to the app's root. Play with it and let me know, and once it's fine I'll merge it and push it to npm 😄 |
@rborn Thank you; is there any chance for it to follow this spec? NativeScript/NativeScript#2609 |
@vbresults so you'd like to have the i18n folder inside the |
@rborn Edit: Your package.json idea is better, will try it out |
@vbresults related to the edited reply, until we have something official from NS I wouldn't venture in implementing something like this (application.paths). Let me know how it goes |
@rborn Please allow us to pass a I18n source folder path when requiring the plugin so that we can have it follow our own directory conventions instead of having to use a hardcoded path; thank you (:
The text was updated successfully, but these errors were encountered: