Answer the question
In order to leave comments, you need to log in
Angular: how to switch language?
Good time of the day!
I need to implement language switching (by a button in the application itself) without reloading or redirecting. I did not find such functionality in the i18n documentation .
Is there a built in angular engine for this task? If there is no such mechanism, what is better to use?
Answer the question
In order to leave comments, you need to log in
No way. i18n does not currently support changing the language on the fly. Angular compiles separate bundles for each language and the whole application will be reloaded when changing the language.
To change the language on the fly, use ngx-translate or wait for Ivy - they promised to implement in the new engine
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question