Language and time zone settings

When you query OSLC resources, you can specify parameters or header values to determine the time zone and language for the returned values.

The language and time zone settings apply to a request. The client must send the settings with every request that a language or time zone change is required for. If the client does not send language or time zone settings, then the settings in the user's My Profile record are used.

Language settings

To specify the language, you can use the query parameter _lang and set the value as languageCode-countryCode.

The languageCode is a lowercase, two-letter code that is defined by ISO-639. The countryCode is an uppercase, two-letter code that is defined by ISO-3166.

For example, en-US is the language value for English in the United States.

You also can use the HTTP header parameter accept-language to specify the language. In this case, multiple languages can be specified and the system determines which language to return based on the ranking, or "q" value for the language.

Languages that IBM TRIRIGA does not support are excluded, and the language with the highest q value is selected. If no q value is specified, a value of 1 is used.

For example, if the accept-language parameter has a value of en-US;q=0.8,zh-CN;q=0.9,es;q=0.7, the language zh-CN is used in the returned values because it has the highest q value.

Time zone settings

To specify the time zone, you use the query parameter _tz and set the value in the format US/Pacific GMT-0800.