Open lepokle opened 5 years ago
Hi @lepokle Can you elaborate as to how it isn't working as expected?
Hello together, I have the same issue here. Cannot get the plugin working with 6.0.1. The key string to be translated is returned rather than the translated version of it.
In localize.android.ts the returned identifier from getStringId = 0. I added the plugin to app.module.ts and added the i18n folder to app folder. My en.default.json file looks as follows: { "app.name": "My app", "strHello": "Hello World" }
export function localize(key: string, ...args: string[]): string { let localizedString; try { const identifier = utils.ad.resources.getStringId(encodeKey(key)); localizedString = identifier === 0 ? key : getResources().getString(identifier); } catch (error) { localizedString = key; } return vsprintf(localizedString, args); }
Update, if I move the i18n folder from app to src than the strings are detected and the plugin works as expected
Update, if I move the i18n folder from app to src than the strings are detected and the plugin works as expected
Thank you it's work
@EddyVerbruggen can you update readme please ?
I've installed nativescript-localized as noted in the installation instructions.
However, localization does not work as expected.
Version information:
Any help would be appreciated.