Skip to content
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

New OverrideLocale function doesn't work on Android #78

Open
panagulis72 opened this issue Jul 11, 2019 · 9 comments
Open

New OverrideLocale function doesn't work on Android #78

panagulis72 opened this issue Jul 11, 2019 · 9 comments

Comments

@panagulis72
Copy link

panagulis72 commented Jul 11, 2019

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

@panagulis72 panagulis72 changed the title Has no exported member 'overrideLocale' New OverrideLocale function doesn't work on Android Jul 11, 2019
@panagulis72
Copy link
Author

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
Copy link
Author

Nobody?

@webmeemba
Copy link

any suggestion ?

@harshitjain0803
Copy link

@panagulis72 - found any work around for this?

@panagulis72
Copy link
Author

@harshitjain0803 I'm sorry, I didn't

@emog
Copy link
Contributor

emog commented Jul 4, 2020

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

@wyong95
Copy link

wyong95 commented Jul 20, 2020

@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
Copy link

@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
Copy link

Possible solution for this (worked for me and someone else, too) can be found here: #98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants