Introduction to Internationalization in Angular

Introduction to Internationalization in Angular

Angular

2 года назад

119,403 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@1qais1
@1qais1 - 28.12.2023 15:51

How can we create a button to change locale in the runtime for users ?

Ответить
@rembautimes8808
@rembautimes8808 - 23.12.2023 03:47

I really like these videos. The presenter is awesome, the content creation and curation team is wonderful as well. Within 8 mins, we got the concept of how this is going to work. High five to the team!

Ответить
@SvenBudak
@SvenBudak - 08.12.2023 06:44

This tutorial is very good, but it forgets the most important question. How do you get the country code (for example, /de or /en) into the routing of the Angular app?

Ответить
@WeihanLi-dotnet
@WeihanLi-dotnet - 15.11.2023 12:34

A little sucks that can not change language dynamically

Ответить
@robertomessa9126
@robertomessa9126 - 08.11.2023 06:03

Shitty solution! You cannot maintain the app.

Ответить
@valikonen
@valikonen - 12.10.2023 13:08

OMG it's ugly this approach!

Ответить
@sundarraj9384
@sundarraj9384 - 11.09.2023 08:56

ng add @angular/localize
ng extract-i18n --output-path src/locale

Ответить
@duccm
@duccm - 23.08.2023 04:44

go team😃

Ответить
@user-qh2wh2se2d
@user-qh2wh2se2d - 22.08.2023 08:48

each time i run ng extract-i18n, i would have to rebuild the locale versions ? is there .xlf tools that handle that ?

Ответить
@user-uq1sz2sw1w
@user-uq1sz2sw1w - 21.08.2023 18:28

Is there any way to hide the default locale from the route path?
ex: my default locale is "pt"
I want to use it like: localhost:4200/home instead of localhost:4200/pt/home

in other locales, its ok to have it in the route path.

Ответить
@fredzouza
@fredzouza - 12.08.2023 17:24

Witch version are you using? Using cli 15+ doesn't work nothing happens no errors just don't work, in my enviroment i create a project with cli 12 and works fine but using 15+ don't.

Ответить
@xaviersoh
@xaviersoh - 07.08.2023 08:43

Well done

Ответить
@ishowspeed7191
@ishowspeed7191 - 17.07.2023 18:49

is target tag gets the translated text automatically or we need to set that manually sir!. because i didn't get that translated text by default sooo...

Ответить
@vidhyak1294
@vidhyak1294 - 04.07.2023 12:13

How to do translations in micro frontend architecture? how to sync the language switch between shell and remote?

Ответить
@muhammadhamza3231
@muhammadhamza3231 - 24.06.2023 21:43

select default arabic in angular

Ответить
@bullettime2808
@bullettime2808 - 15.06.2023 11:54

I don't see the translation in the app, I have no Idea what I missed

Ответить
@pavanbashetty3409
@pavanbashetty3409 - 12.06.2023 09:32

I got an error after running "serve dist\with-localize-two\"

serve : The term 'serve' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

Ответить
@MuhammadHassan-yt2vv
@MuhammadHassan-yt2vv - 08.06.2023 14:52

hi, i want dropdown to switch language and want to add more than 5 languages. so how to add target for that and how to add target once for whole page in different language

Ответить
@amrezzat2192
@amrezzat2192 - 30.05.2023 17:15

how to configure an IIS server to support Localization?

Ответить
@DavidJames535
@DavidJames535 - 10.05.2023 06:43

I want to have an option tag and select the language I want. How can I do that?

Ответить
@skinwalker_
@skinwalker_ - 02.05.2023 18:14

Great explanation! Thanks

Ответить
@newen1314
@newen1314 - 20.04.2023 10:59

That's great, but this is just the tip of the iceberg, switching language (with route or select option) is another story that is sadly not covered in this tutorial and could have been really useful for beginners like me having just the internet to learn.

Ответить
@mohitsoni8951
@mohitsoni8951 - 29.03.2023 13:58

If we have 40-45 languages, how we would handle it from angular.json ? In previous version can simply use i18n-file, i18n-format, i18nLocale params with build

Ответить
@maxstetsenko8626
@maxstetsenko8626 - 11.02.2023 16:46

Great content !

Ответить
@rk1484
@rk1484 - 25.01.2023 19:31

I am getting below error
An unhandled exception occurred: ENOENT: no such file or directory, open 'C:\Users\u1281417\myapp\src\locales\messages.hi.xlf'
FYI I have also added @angular/PWA in my project

Ответить
@icesystem7
@icesystem7 - 17.01.2023 19:43

To me doesn't make much sense,
so we generate the xlf file.. copy.. edit, and translate. so far so good.
later we need to add another translation.. remove others..etc
How is this suppose to happen exactly?
every time we make an update we have to go again trough the whole file and add the translated <target> element?

Ответить
@NitinJadhav
@NitinJadhav - 11.01.2023 23:32

This approach is much smoother than a lot of other implementations of i18n I have seen. Good job, team!

Ответить
@grishamozias6354
@grishamozias6354 - 23.12.2022 11:35

In my humble opinion, the reactive approach are much better. less boilerplates, better readability and easier for deployment. for large scale applications, probably, I will still have to refresh the page, but it's a small price to pay :). Anyway, a new Angular 15 it's a blessing! I was waiting for a standalone components for many years! Thank you for your great work!

Ответить
@davidsosa5940
@davidsosa5940 - 06.12.2022 22:06

what is that vs theme

Ответить
@jeffreycarre
@jeffreycarre - 01.12.2022 10:41

Hi @Angular, I could not find a way to add missing common locals, for example I am trying to add ht (for haitian creole). I see that they are extracted directly from CLDR. I translated all the necessary ts/js/mjs files but they are not in the node_module. @import seems to ignore it

Ответить
@huw1676
@huw1676 - 23.11.2022 20:58

I came up with my own solution in Angular 6 back in early June 2018. My site supports multiple languages, and even switches to your preferred language such that you don't have to. It's good though that this comes as-supported in the later versions of Angular.

Ответить
@therealJayRoe
@therealJayRoe - 26.10.2022 11:57

How do you get autocompletion for angular.json in VSCode?

Ответить
@albanx1
@albanx1 - 19.10.2022 22:41

I do use translation run time (cause I support only 2 languages).

The performance issue with the binding I solved it using with a pure pipe with an extra parameter (language) which is triggered only if the language changes:
{{ 'Category' | _: trans.lang }}

Ответить
@nikoszervo
@nikoszervo - 14.10.2022 10:37

The only thing in Angular that I don't like. I wish it was similar to what android does for localization. But it's good that we have a way of doing that.

Ответить
@vladimirv6438
@vladimirv6438 - 07.10.2022 21:17

Thank you for this content. Could you also tell how to deal with i18n when using *ng-Stuff (like *ngFor, *ngIf....) In the version i have tested it is just disappearing silently... and grey hair appear...

Ответить
@schlingelgen
@schlingelgen - 20.09.2022 12:31

I only ever used the approach where you have messages.en and other files and reference a specific key which has a value in every file for the respective language. This approach seems very complicated to me and I don't see the benefit. Can someone enlighten me?

Ответить
@otmanm4095
@otmanm4095 - 17.09.2022 18:33

Love your work, love Angular, so much things to make life easier, thanks.

Ответить
@universalworthy2169
@universalworthy2169 - 03.09.2022 06:38

Hi Mark, how to switch between these two languages? My app keeps staying in the translated version.

Ответить
@danielaldridge818
@danielaldridge818 - 30.08.2022 01:53

Im not sure what is going on. Where did the Translation service come from? How was the build done? Are you saying there are multiple builds, one for each language?

Ответить
@bitbinge
@bitbinge - 18.08.2022 06:18

Amazing tutorial.

Ответить
@joelwachter3557
@joelwachter3557 - 14.08.2022 09:47

I need this tshirt!

Ответить
@jacekmaolepszy5342
@jacekmaolepszy5342 - 03.08.2022 12:53

Done !

Ответить
@nieuwenaam233
@nieuwenaam233 - 31.07.2022 15:36

Hi, I am looking to internationalize my application, but when looking online no one is mentioning anything about a button to switch between languages. Is this because the browser is detecting the locale of the user and loading the right translation dynamically? And how would one code a button for users to switch from one locale to another? Thanks in advance

Ответить
@dinesh.merugumilli
@dinesh.merugumilli - 26.07.2022 15:53

The command `ng extract-i18n --output-path <path>` is now changed to `ng xi18n --output-path <path>`

Ответить
@lahatraanjararavelonarivo9125
@lahatraanjararavelonarivo9125 - 09.07.2022 08:58

Thanks a lot🙏! I like so much angular and this video really help me. But I have a question that is not concerned this post a lot. How to use angular with websocket ? (receiving notifications for the back-end for example or making a chat application in angular).

Ответить
@elenaljubijankic8126
@elenaljubijankic8126 - 05.07.2022 17:59

Is there a way to print a different currency symbol according to the locale? Like $, € or £? In your example - and using currency pipe - the total amount gets formatted by the $ sign stays the same. Thanks in advance!

Ответить
@elmotareal
@elmotareal - 30.06.2022 13:26

This looks simpler than what it really is :) I wish you would cover one issue though, when new pages come in, and we extract all over again, what happens to the existing translations? do we have to extract to a new file then merge manually? or does the merge happen automatically?

Ответить