fr-CA represents French as used in Canada). fr for French), followed by optional subcodes representing such things as country (eg. It is typically a two- or three-letter language code (eg. The value itself should conform to BCP 47 ( Tags for the Identification of Languages). Most mainstream browsers allow you to modify the language preferences that your browser sends with the HTTP request. If none of the languages you request are available, the server should be set up to return a default language choice. If there is only one version of a page on the server, that version will be retrieved. Is set up to return alternate versions of a page or resource in more than one language, and the language you prefer is available, it will go through a process knownĪs HTTP content negotiation to find content in the language(s) indicated in the HTTP request. The HTTP request carries this language preference information in the Accept-Language header. With the request, the browser sends information about its language preference settings. When your browser pulls a document from the Web, it sends a request to the server where the information is stored. This section sets the scene by briefly describing the technical details behind what is going on. The details below tell you how to discover and change the language preferences For example, if you have a Japanese version of a browser, the browser typicallyĪssumes that you prefer pages in Japanese, and sends this information to the server. In many cases, the initial browser setting will meet your needs. You can use the Internationalization Checker to discover the language(s) currently being requested by your browser. If your browser is set to request a language for a specific region, such as Canadian French, you should ensure that there is another language tag listed after it with just the vanilla language subtag (ie. However, for browsers on mobile devices (and at least one on the desktop), the language preferences are likely to be determined by the operating system settings, or in some cases by the language of the system when you installed the browser.īrowsers that allow you to change your language preferences will generally allow you to specify a list of languages, so that if your first choice is not available you can say what alternative languages to try, and in what order. See the next section for examples of how to change these settings. These tell the server what language you prefer for pages and resources that it sends you (separately from the language of the browser user interface). Most desktop browsers have settings that allow you to check or change the language preference settings. The browser settings discussed here do not affect content negotiation based on this kind of mechanism. For example, Google tends to use IP information to determine the language you will receive. Sometimes a server may determine which language to send to you in a way that doesn't rely on the Accept-Language information.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |