Closed Bug 398625 Opened 13 years ago Closed 13 years ago
l10n URL support
We need support for the locale string in the URL: * support.mozilla.com/en-US/kb/Article+Name * support.mozilla.com/sv/kb/Article+Name * support.mozilla.com/en-US/chat/ * support.mozilla.com/en-US/forum/ When accessing a locale that doesn't include a requested kb page, it should fall back according to the http accept-language header (or the fallback language a logged in user has specified). However, the URL should remain unchanged.
We also need this for in-product help: support.mozilla.com/fr/kb/Article+Name?ver=3 which rewrites to support.mozilla.com/tiki-index.php?page=Article+Name&lang=fr&ver=3 ver=3 here means Firefox 3, and this assumes that we're using the Versions plugin (see bug 388960)
changes committed to support-stage for kb, but not for chat and forum.
this is now almost done. * support-stage.mozilla.org/en-US/chat/ * support-stage.mozilla.org/en-US/forum/ now works. Remember to set the settings in the i18n panel: tiki-admin.php?locale=en-US&page=i18n Show pages in user's preferred language: Detect browser language: The only thing is that when a user clicks "Support home", the locale is reset. Not sure what the requirements are regarding the home page. Is that needed right away?
I just committed something that allows for * support-stage.mozilla.org/en-US/kb/ and changed the "Firefox Support" link to point to that (preserving locale). If any more changes are needed, let me know.
How exactly do I test this? With "Detect browser language" turned on or off, if I go to <http://support-stage.mozilla.org/kb/Profiles> and change the language to Nederlands, I am taken to <http://support-stage.mozilla.org/nl/kb/Profiles>, but I am still shown the English version, and a message at the top says "This article has not yet been translated to Nederlands (nl)." The nl version is the article "Profielen" (see <http://support.mozilla.com/kb/Profielen> ). It is already marked as a translation of "Profiles", which is why it appears in the drop-down list. Even if I go to <http://support-stage.mozilla.org/nl/kb/Profielen>, it takes me to the English version. Is that what you wanted tested?
Once I turn on "Show pages in user's preferred language: x", the problem disappears. Please verify. Thanks.
It works, except the article name in the URL does not change.
the language switcher now changes the URL as well. As for other direct links, I think it is not worth the extra redirect on the server just to change the URL, what do you think?
we can open a new bug for the additional enhancements - a more generic locale detector when locale is not specified...
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
(In reply to comment #8) > the language switcher now changes the URL as well. As for other direct links, I > think it is not worth the extra redirect on the server just to change the URL, > what do you think? > The downside of not changing the url is that /kb/* urls are then used, which means it doesn't remember the locale. Example: navigate to support-stage.mozilla.org, which redirects to http://support-stage.mozilla.org/kb/Firefox+Support+Home+Page. I then click on a link that has a Swedish translation, which takes me to e.g. http://support-stage.mozilla.org/kb/Profiles&bl=y and displays the page in Swedish. I guess it's not a problem since the links from in-product would append the locale in the url anyway, e.g. http://support-stage.mozilla.org/sv-SE/kb/Firefox+Support+Home+Page
What's the purpose of the bl=y part of the URL?
You need to log in before you can comment on or make changes to this bug.