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

Auto-redirect to localized version #496

Open
AHOHNMYC opened this issue Apr 29, 2020 · 9 comments
Open

Auto-redirect to localized version #496

AHOHNMYC opened this issue Apr 29, 2020 · 9 comments

Comments

@AHOHNMYC
Copy link
Contributor

AHOHNMYC commented Apr 29, 2020

I propose redirector that will look on navigator.language and redirect on justdeleteme.xyz/{lang} with fallback to English.

It will be easier to handle auto- and manually-generated redirects if justdeleteme.xyz/ will only handle redirects and the English version will be on justdeleteme.xyz/en.

Working example: chuyu.me (sources)

@tupaschoal
Copy link
Member

I like the idea, though I'm unsure as to whether I'd like to make justdeleteme.xyz/ just a pass-through. Thoughts @PyroSamurai and @Nightfirecat ?

@Nightfirecat
Copy link
Member

https://justdeleteme.xyz being a fully-formed site is good for a couple of reasons--it's good for SEO, it provides some experience for users who might have scripts disabled, and it is already familiar to users of the site. I wouldn't be opposed to adding some feature which would create an unobtrusive banner/alert/modal of some kind that could clue a user in to the fact that we offer translated versions of the site.

@PyroSamurai
Copy link
Member

PyroSamurai commented May 1, 2020

As long as it doesn't add some type of tracking or cookie. I'm fine with it. Also, I'd like the user to maintain the ability to manually change the language to whatever they wish. The redirect should only happen once.

@tupaschoal
Copy link
Member

@AHOHNMYC can you work with these constraints and PR it? :)

@AHOHNMYC
Copy link
Contributor Author

AHOHNMYC commented May 2, 2020

I absolutely share @PyroSamurai's vision about project. But if SEO needs something on main page...

To prevent redirect loop, we have to have some sign. I think about bool noLangRedirect key in localStorage. If it exists, no more redirects happens.
It is not tracking, but saving preferences.

Or the last thing left: small notification. But to not show it after every page reload, we also have to store some preference~

@tupaschoal now I see only one way to prevent cookies and get single redirect with static Jekyll, but it goes against SEO...
Notification may be added painlessly (but not hidden w/o 🍪, huh).

@Nightfirecat
Copy link
Member

localStorage exists for basically just this reason.

@tupaschoal
Copy link
Member

PR #503 was on track to deliver this, but it was abandoned. If anyone wants to pick it up, I'd suggest to start from there :)

@Nightfirecat
Copy link
Member

@tupaschoal Do you know/remember what standard was used for the language code renaming? I checked #941 but didn't see any clear direction to follow for that.

@tupaschoal
Copy link
Member

We never did rename the languages, I think, we only dropped the country flags. The current "convention" came from the original repo, so I don't know what was picked

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

Successfully merging a pull request may close this issue.

4 participants