Topic on Extension talk:Translate

Adapting content based on user language preference

2
MarcoSwart (talkcontribs)

Is there a way to find out what the the preferred language of a user is and have a template present some information based on this preference? On Dutch Wiktionary we have many non-Dutch editors making valuable contributions and probably also readers who are learning our language. Because our content is structured by nature, we have a large set of templates presenting readers and editors with interface-type information (language, part of speech, grammatical types, context labels). If we knew the preferred language of the reader, we could present a translation of this type of information e.g. in a tooltip.

Nikerabbit (talkcontribs)

The regular assumption is that the currently selected interface language is the user's preferred language, and use {{int:messagename}} to display text in that language. With JavaScript you could ask ULS for guesses for preferred language.