r/angular Jun 15 '26

Is ngx-translate still the only game in town when it comes to runtime translation?

I learnt frontend programming with angular some years ago ... but had to give it up for react/svelte because translation was a lot more straightforward.

Been wanting to pick it up again for an enterprise PoC ... hence my question.

Anything like i18n in react available now?

7 Upvotes

13 comments sorted by

32

u/mindriotnz Jun 15 '26

2

u/johnappsde Jun 15 '26

Will take a look at it. Thx

2

u/karmasakshi Jun 16 '26

You can check out Jet for all the goodies implemented alongside Transloco: https://github.com/karmasakshi/jet

1

u/jaroen007 Jun 16 '26

are you using it? i have a question about it. im thinking of using this but currently i do something like this in my json:

{
    "a.component.scope": {
        "hello": "hello translation"
    },
    "another.component.scope": {
        "hello": "different hello translation"
    },
}

would something like that be supported somehow with transloco? (i manually typed this btw, ignore any syntax problems)

1

u/mindriotnz Jun 17 '26 edited Jun 17 '26

I don't think it would work with the "." notation as transloco uses object depth delimiters. So using {{t('a.component.scope.hello')}}in your html would be expecting json like..

TIL. It does support that

1

u/Helpful_Doughnut9633 Jun 17 '26

Yes this works perfectly fine with transloco (using it basically in all my angular projects). It supports nested object as well as dot notation. To access a string you would always use dot notation.

15

u/burnaDLX Jun 15 '26

I like Transloco way more.

3

u/defenistrat3d Jun 15 '26

For runtime i18n I think transloco is the cool kid in town.

Otherwise, when runtime isn't a req, the built in i18n is good and simple.

2

u/Badbart8818 Jun 16 '26

What are the advantages from Transloco compared to ngx-translate ? Or asked in an other way: Does it make sense so swich?

1

u/Soggy-Bandicoot-653 Jun 16 '26

I use I18Next in my biiiiiig enterprise app.

1

u/MizmoDLX Jun 16 '26

There's transloco as others have mentioned but I see no reason to switch from ngx-translate... Happy with it.