EddyVerbruggen / nativescript-localize

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

New OverrideLocale function doesn't work on Android #78

Open panagulis72 opened 5 years ago

panagulis72 commented 5 years ago

The new overrideLocale function (with 4.2 version of this plugin) doesn't work with Android

panagulis72 commented 5 years ago

P.S. If i change the language and I use overrideLocale it doesn't change the old translations, even if I use this.cdr.detectChanges(); Any suggestion?

panagulis72 commented 5 years ago

Nobody?

webmeemba commented 4 years ago

any suggestion ?

harshitjain0803 commented 4 years ago

@panagulis72 - found any work around for this?

panagulis72 commented 4 years ago

@harshitjain0803 I'm sorry, I didn't

emog commented 4 years ago

@panagulis72 - Try to call androidLaunchEventLocalizationHandler() after overrideLocale().

wyong95 commented 4 years ago

@emog call androidLaunchEventLocalizationHandler() after overrideLocale(). make it works. but after kill the app and reopen again, the app language back to default device's language. how to make it display with the language selected instead of showing default device's language?

itsmerockingagain commented 3 years ago

@wyong95 Try adding this in app.component.ts import { on, launchEvent } from '@nativescript/core/application'; import { androidLaunchEventLocalizationHandler } from 'nativescript-localize/localize';

on(launchEvent, (args) => { if (args.android) { androidLaunchEventLocalizationHandler(); } });

@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) .......

i am able to see the changed language after killing the app and again reopening it, but there is jerk on screen

AdrianHavengaBennett commented 2 years ago

Possible solution for this (worked for me and someone else, too) can be found here: https://github.com/EddyVerbruggen/nativescript-localize/issues/98