Angular - Translations / Localization Tutorial 2024 (i18n)

preview_player
Показать описание
How do add translations (i18n/internationalization) to your Angular project 2023/2024.

#angular #tutorial #i18n #localization
Рекомендации по теме
Комментарии
Автор

First of all, allow me to say that this is a very simple tutorial, yet elegantly put and explained straight to the point!
What I still lack in knowledge about working this way with i18n is the ability to switch between languages on the fly while the app is running, and not just by setting the default language to another one. Let's say I would like to apply a button that by clicking on it, the current language changes to a selected one.

kobibentata
Автор

do you have a video on how to switch the language at run time and switch between ltr and rtl ?

androidsavior
Автор

what if you use the TranslateService function use(lang: String) referring subfolders (ex. ../i18n/component1/es.json, ../i18n/component2/es.json). The target is to split the translations in multiple files instead of having only one file (ex. ../i18n/en.json or ../i18n/es.json) for every components? I tried calling the translateService in each component with path ('componentName' + 'es') but the last constructor call overwrite the global translateService path :/

LucaDiSabatino-tp
Автор

I am facing issue with angular 17, as i am upgrading my application from 16, could you please tell me the resolution . Thanks a ton in advance !

SachinBisht-mq
Автор

i have an issue in angular ssr when i do routing for seo like /en /fr but i get error : 'Http failure response for /assets/i18n/en.json: 0 undefined', when i prerender it, do you have any idea how to fix it ?

initialScript
Автор

can you show for angular 18 version please

dinocheeta
Автор

Hi, is there a way to split the en.json file into smaller json files? I'm having a lot of troubles to do it

yeinsdavidllanohernandez
Автор

How to translate text from api (normally like string config) in angular app?

dingmarius
Автор

what if you use standalone components?

GladiatorGameur