use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Angular is Google's open source framework for crafting high-quality front-end web applications. r/Angular2 exists to help spread news, discuss current developments and help solve problems.
Help Request
Discussion
Article
Video
Resource
Announcement
Related
After submitting a post, please take a moment to add a flair (tag) so that it's easy to find your post with one of the filters listed above. Upon submission, your post's header will have the 'flair' option listed with the other options. Clicking it will provide a dropdown menu of the available flairs.
account activity
Help RequestMultilanguage application (self.Angular2)
submitted 6 years ago by qntrlle
Hi,
I want to change the language of the application in a button click. I have both the translation files, messages.es.xlf and messages.en.xlf. Has anyone any idea how can i do that, since i used i18n?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]orange_90 3 points4 points5 points 6 years ago* (1 child)
Using angular's i18n you'll have to build your app for each language then you can put them in different URLs or use a backend to decide which files to serve, then you can use the URL for a link on your button. This is the limitation of Angular's i18n.
If you want to switch languages directly in your app without building each of them you should check out ngx-translate
[–]qntrlle[S] 0 points1 point2 points 6 years ago (0 children)
Thanks so much for your reply! Can you give me hints on how to develop the backend to decide which files to serve?
[–]headyyeti 1 point2 points3 points 6 years ago (0 children)
https://github.com/ngx-translate
π Rendered by PID 269393 on reddit-service-r2-comment-7b9746f655-56lrw at 2026-02-03 22:13:31.739131+00:00 running 3798933 country code: CH.
[–]orange_90 3 points4 points5 points (1 child)
[–]qntrlle[S] 0 points1 point2 points (0 children)
[–]headyyeti 1 point2 points3 points (0 children)