clientLanguages

Top  Previous  Next

The content of this element lists the possible languages that client applications should allow users to choose between. The list of languages is provided as a list of language codes as either a two-letter language code or a two-letter language code, followed by a dash and a two-letter country code. The list of language codes must be separated by semi-colons. e.g.

 

 <clientLanguages>en-gb;en-us;en;fr;de</clientLanguages>

 

The order of the language codes are also used as a default preference order when rendering topic labels.

 

This element has an additional optional attribute which helps to control the interaction between a user's browser settings (or the accept-languages header in an AJAX request) and the server language settings. The attribute useClientPreferenceOrder can be set to either true or false. If true, then the list of language codes received from the client will be used to sort the list of client languages supported by the server, so where there are overlaps, the client's requested order will be used. If false, then the order of the language codes in the clientLanguages element defines the preference order. The default value for this attribute is false.

 

NOTE: useClientPreferenceOrder only allows the client request header to change the order of the client language list specified inside the clientLanguages tag. It does not extend or filter the list of client languages. Thus you as administrator are always in full control of what languages are supported on your server in both the editing and display interfaces, the client's browser settings will just change what language s/he will say as the "main" language.

 

This element is a child of the clientApps element.