UP.SDK Developer's Guide

[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Internationalization
Section 59 out of 61 total sections , Section 2 out of 3 sections in this chapter


Providing WML content in multiple languages

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:

http://www.unicode.org

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.


[Cover] [Previous Section] [Next Section] [Index]


Copyright © 2000, Phone.com Inc. All rights reserved.
Please send comments and questions to doc-comments@corp.phone.com.