Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TranslateFSLoader fails to find path to traduction file. #4

Open
vbonne opened this issue Oct 20, 2020 · 1 comment
Open

TranslateFSLoader fails to find path to traduction file. #4

vbonne opened this issue Oct 20, 2020 · 1 comment

Comments

@vbonne
Copy link

vbonne commented Oct 20, 2020

Hi Dimitry,

Very good your article on indepth.dev
I implemented everything like you recomended but then I can see both :
1 - the script with the translations keys in the page served by the server
2 - the request for the Json is also visible in the network logs,

I figured out that when I change the language the page is not requested again to the server, so the script stays with the language loaded the first time the page was loaded, so that is why the http request is done to the server to get the new language.
So where is my mistake in the implementation ? Should force a page reload when switching language ( but I doubt the language would change on the server side when making the change on the browser) or should i include the language in the url ?

Many thanks for your post and your github project, this is the only compehensive and functional tutorial I found after 3 days strugguling with ngx-translate and ssr. Hope to hear from you soon.

EDIT : I initially reported an SSR error but that was my mistake, your github exemples are fine I just got mixed up between the steps

@DmitryEfimenko
Copy link
Owner

Uff, just noticed this question - 2 years after. Sorry about that. I hope you figured out the issue. If not, a repro repository would be nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants