-
Notifications
You must be signed in to change notification settings - Fork 1
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
Redirect to location if not location is set #1
Comments
Sorry for the wait, I'm busy with other things these days. The It will probably be done next week btw :) |
Cool - looking forward for the plugin. |
Hey, I've been late on this feature. |
@kiuKisas, i checked the progress and I am glad to see that you are still working on it. Thanks for your effort! |
Hey @BetaConnector , about your initial question, regarding redirection... I apologized for that. I'm starting to doubt the use of an integration with svelte-i18n as it requires hydration (complete if we want to internationalize the whole site), which is the opposite of what elderjs proposes. Moreover, it doesn't seem to bring much in the end... But so be it, I'm going to finish what I've started. Let's just say that it makes an easier transition from any svelte project with svelte-i18n to elderjs :) (or a svelte component dependent of svelte-i18n). All is not lost, it allows me to explore ways to add client code from an elderjs plugin and also to integrate in this project a "generic" base for client-side integration. Now, after You can technically already do that as I expose the different permalinks of each locale with N.B: With your initial comment in mind, the language will not be taken from path, as the path is already made from language. We don't have to care about it :). Also, note that google don't recommend to use redirection as I mention in #4 I keep this issue close in favor of #4 |
Hey @kiuKisas, thanks for your explanation. My plan is to use language specific urls ( I think right now I will wait fo you to finish the helper.
I think the main concern of google is that the user or crawler won't be able to find the other language:
So if every english page has a link to the german version i think the initial redirect should be not a big deal. Initial redirect means the redirect if no language is set: As far as I understood I have to take care of this redirect, since this plugin won't take care of it? Thanks for your effort! |
ok, so if I understand, www.domain.net doesn't have any content, but you have www.domain.net/en and www.domain.net/de right ? So you need a redirection on your home www.domain.net only, correct ? You probably should manage that from your server as it's a one time redirection, for example, if you have a nginx server, you can follow this: https://stackoverflow.com/questions/3657614/how-to-rewrite-location-in-nginx-depending-on-the-client-browsers-language NOTE: in elder-plugin-i18n, you should set |
@kiuKisas, exactly that's what I am trying to achieve. As I am planing to host on netlify I am not quite sure about the redirects - that's why i thought redirecting via JS. But there seems to be a better way (server side): Thanks for the hint! 👍 |
Hey,
I am waiting for the plugin and I was wondering about redirects.
For example if a user navigates to my site https://www.mysite.com it should redirect to https://www.mysite.com/en and the language should be taken by path (svelte-i18n: getLocaleFromPathname).
Is there solution in this plugin or should I think of a own implementation?
Thanks in advanced - Alex
The text was updated successfully, but these errors were encountered: