Closed chriseugenerodriguez closed 7 years ago
yes, but it prints the default language, that is 'en'
you can get the user language on the server with the accept-language header, just change the server.ts and app.component.ts as the following gists:
https://gist.github.com/evertonrobertoauler/20c572bf6f49123dc3debabeba097e44
https://gist.github.com/evertonrobertoauler/3c208d3f2bf7bf68748eb569f58bed79
@evertonrobertoauler hey thanks for this info. I managed to change these two files, but no luck. I added it to repo too if you could check.
@premiumwd here it is working just fine, i didn't change any file, I cloned your repo as it is right now.
0948fd5 (HEAD -> master, origin/master, origin/HEAD) server side translations change
@evertonrobertoauler so did you load it initially in spanish, or did you use dropdown and change language? I used dropdown to change language. How did you change language and get it to print out initially? I am changing language with dropdown and viewing source. Thanks a lot for your help bro.
It did load initially in pt
because in the server code I'm getting the accept-language header that the browser sends with the request.
I didn't need to use the use the dropdown.
how did you load it initially in pt?
@evertonrobertoauler really appreciate you helping me on translation issue, anyway I have language print out in html when I change language?