When an UP.Phone generates a request, it indicates to the UP.Link Server which language(s) it prefers to receive content in. The UP.Link Server relays this information by setting the Accept-Language
header in the HTTP requests it submits to WML services. Normally, the Web server that hosts the WML service converts this header to an environment variable named HTTP_ACCEPT_LANGUAGE
. If you want your WML service to provide localized content, you should check this environment variable and provide the localized content accordingly.
The Accept-Language
HTTP header (and the HTTP_ACCEPT_LANGUAGE environment variable) specify comma-separated lists of language-country identifiers (as defined in ISO 639) and two-character country codes (as defined in ISO 3166). For example, the identifier en-us
indicates the UP.Phone prefers content in U.S. English. You can find a list of these codes at the following URL:
The header lists language-country identifiers in order of preference. So, if the HTTP_ACCEPT_LANGUAGE environment variable specifies a list of identifiers, you should attempt to provide content according to the first possible identifier in the list.