#Page title translation with ngx-translate not reactive

2 messages · Page 1 of 1 (latest)

shell charm
#

I have a language selection dropdown that people can use to set their preferred language with ngx-translate.
But when a new locale has been set to use, the page title remains the same. Only after a route change the title is translated (which is expected according to documentation https://angular.dev/api/router/TitleStrategy).
How can I make the page title reactive to the ngx-translate use of locales?

The web development framework for building modern apps.

dreamy crypt
#

Call Title.setTitle() again when the local changes. Or reload the application (which would be needed anyway if you use the standard number, date, percent and currency pipes, which rely on the immutable LOCALE_ID)