I'd like to let users select their preferred interface language from the Main Page (from a drop-down list below the search box)...
Has anyone done this before?
Also is it possible to do this without a user signing in?
Anything else I should think about?
Thanks.
Paul
admin Yellowikis yellowikis@gmail.com wrote:
Also is it possible to do this without a user signing in?
I was just about to ask about this as well. Is there (or could there be), say, a magic URL string to append, like &lang=fr , to force the fr UI to be displayed?
In a similar vein, is there a magic word that automatically returns the current interface language code? The reason being to make a page like a list of translatable messages, and instead of giving a list of every possible translation language, using one link that would automagically point to the user's language, e.g.: being able to write [[Mediawiki:custommessage/{{LANGUAGECODE}}|Translate into your language]] instead of having to have a list like [[Mediawiki:message/ja]], .../fr]], .../es]], etc., or instructing users how to hack URLs.
(I know I can do it by hand--by making e.g. [[Mediawiki:lang]], and filling the [[.../es]], [[.../fr]], etc. with the appropriate codes, and using {{int:lang}} instead of the hypothetical magic word, but it seems wasteful since the site already knows what's language it's serving pages in anyway, no...?)
*Muke!
Muke Tever wrote:
I was just about to ask about this as well. Is there (or could there be), say, a magic URL string to append, like &lang=fr , to force the fr UI to be displayed?
There is not. Hypothetically something could be added with some effort. Maintaining it across invocations would probably require some cookie / session work, and you'd need to be careful about cache integrity.
In a similar vein, is there a magic word that automatically returns the current interface language code?
The _content_ of pages is immutable, and will never differ based on the user interface language setting. (Only a very few user options affect the output of the wiki -> HTML transformation, and we're working hard to eliminate them completely because of the trouble they cause.) This goes doubly for things containing links, categories, images, etc: anything that is kept track of cannot change or you'll have database corruption on your hands.
We already have huge troubles maintaining database integrity in the face of date and time variables and templates.
-- brion vibber (brion @ pobox.com)
That's interesting.
To go back to the original question. How easy is it to change the interface language without the log-in? or would the Wookie (Wiki-cookie :-)) stored on the computer constantly swap the UI back to the one set in User Prefs?
Has anyone seen a Wiki with the UI language choice promoted to the Main page rather than hidden in User Prefs?
On 4/27/05, Brion Vibber brion@pobox.com wrote:
Muke Tever wrote:
I was just about to ask about this as well. Is there (or could there be), say, a magic URL string to append, like &lang=fr , to force the fr UI to be displayed?
There is not. Hypothetically something could be added with some effort. Maintaining it across invocations would probably require some cookie / session work, and you'd need to be careful about cache integrity.
In a similar vein, is there a magic word that automatically returns the current interface language code?
The _content_ of pages is immutable, and will never differ based on the user interface language setting. (Only a very few user options affect the output of the wiki -> HTML transformation, and we're working hard to eliminate them completely because of the trouble they cause.) This goes doubly for things containing links, categories, images, etc: anything that is kept track of cannot change or you'll have database corruption on your hands.
We already have huge troubles maintaining database integrity in the face of date and time variables and templates.
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Brion Vibber brion@pobox.com wrote:
In a similar vein, is there a magic word that automatically returns the current interface language code?
The _content_ of pages is immutable, and will never differ based on the user interface language setting.
All right. Right now I'm working on a wiki where most of the content is relatively language-independent, and am using templates with {{int:}} to make standard headings translate along with the user interface, in order to make the content accessible to more people. A {{USERLANG}} (or whatever) magic word, analogous to {{NUMBEROFPAGES}} etc., [would have] helped make the process slightly easier (and the &lang=xx URL option even more so, by making this available even to non-logged-in users, or at least making it possible to demonstrate it to them without requiring them to create an account first).
*Muke!
mediawiki-l@lists.wikimedia.org