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

Language switcher / selector should redirect to the same page in the chosen language when changing language #376

Open
2 tasks
teolemon opened this issue Jul 23, 2016 · 3 comments
Labels
🐛 bug This is a bug, not a feature request. 🌐 i18n Regarding software localization ⭐ 🐛 top bug Top bug. ⭐ top issue Top issue. top navigation

Comments

@teolemon
Copy link
Member

teolemon commented Jul 23, 2016

What

Language switcher at the top of all pages should redirect to the same page in the chosen language instead of the homepage

Enregistrement.de.l.ecran.2021-09-03.a.15.23.20.mov

Examples

Part of

@teolemon teolemon added the 🌐 i18n Regarding software localization label Dec 11, 2016
@teolemon teolemon added top navigation 🐛 bug This is a bug, not a feature request. labels Sep 3, 2021
@stephanegigandet stephanegigandet changed the title Language switcher should redirect to the same page in the chosen language Language switcher / selector should redirect to the same page in the chosen language when changing language Apr 18, 2023
@teolemon
Copy link
Member Author

Putting a 👍 on behald of Naruyoko

@Naruyoko
Copy link
Contributor

"Country" menu clicks handled here:

}).on("select2:select", function(e) {

Language menu in the template:

Substitution of selected_lang and langs set here:

$selected_lang = "<a href=\"" . format_subdomain($osubdomain) . "/\">$Langs{$olc}</a>\n";

format_subdomain:

sub format_subdomain ($sd) {

Looks like format_subdomain just gets the domain for the language, so they don't look like they're supposed to be used here. Is there something that could take the language and the way to identify a page and return the URL for that page in the language?

@hangy
Copy link
Member

hangy commented Apr 18, 2023

Is there something that could take the language and the way to identify a page and return the URL for that page in the language?

The analyze_request does something similar when a site is called initially. It might be possible to translate ie. the tagtype, and tag name from the current language to the target language doing the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug This is a bug, not a feature request. 🌐 i18n Regarding software localization ⭐ 🐛 top bug Top bug. ⭐ top issue Top issue. top navigation
Projects
Status: To discuss and validate
Development

No branches or pull requests

3 participants