-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Question: changing language #1079
Comments
i chnage to pure ngx-translate and now it works:
now have all components etc translation support without import in every module |
its possible to change lang inside pages folder configuration.module
settingsPage.component.ts
|
for me all works now with pure ngx-translate |
I can confirm that Newan solutions works correctly. For those using Newan's solution : Do not forget to delete the the |
In this code, what is
Can you take a look at my project and see what I might be doing wrong? It is based on JHipster and so the language services are provided by way of JhiLanguageService in the I don't know how to make my lazy-loaded pages use the same translation instances as the eager-loaded part of the app so that changing the language in an eager component of the nav bar affects the language used by the lazy-loaded pages. |
In the app.component.ts
I don't know about the JHipster service or how it works, so I guess you'll have to find out on your own about this part, but anyway, the first module import needs to be at the base root of the application. app.module.ts
Basically, in this project, we have the following structure :
pages.routing.ts
The idea is to import the Nga.module.ts
Hope this helps. |
Thanks @Tenmak I have all of that like you describe except for what's in app.component.ts and app.module.ts because JHipster does these things in another way. In my JHipster app (Great Big Example Application), AppModule imports GreatBigExampleApplicationSharedModule which imports GreatBigExampleApplicationSharedLibsModule. GreatBigExampleApplicationSharedLibsModule contains an import that sets some settings on a JHipster module that itself configures the ngx-translate module. Also my I just read this.. JHipster uses a directive called |
I am also having trouble getting the jhipster jhiTranslate directive to work with ng2 admin. The lazy loaded modules not able to resolve the keys. |
I wont to chnage the language over an select menu.
I add this to my topmenu an binding ist to
this.lang
.addinitional load the translate servive like:
this.lang response 'en' or 'de', both language works fine,
but if i wont change it on runtime with:
it changes only the menu and page title not the page content like the chartpage etc.
if i change the language under AppTranslationModule at runtine it change the global page:
why? thanks for help.
The text was updated successfully, but these errors were encountered: