To localize my Angular 13 application I followed the official guide: https://angular.io/guide/i18n-example , created *.xlf files with translations, everything seams to work fine so far.
Now, I wonder if it's possible to dynamically change current display language (current locale and translations) without re-compiling and reloading the Angular application, keeping the same Url address . For example, I'd like to have a combobox in the component and when user selects a different language, dynamically change UI display language for the entire site. Is this possible using the default i18n Angular 13 functionality? Should I use ngx-translate instead of the default one? What are the pros and cons?
possible solutions with i18n (u will need reload page 100% at this time angualr i18n can't update displayed data in runtime):
with using ngx-translate u can saw actually language when it changed (runtime updated)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.