getLocale()

Retrieve the collaboration locale for the current collaboration object.

Syntax

java.util.Locale getLocale()
 

Parameters

None.

Return values

A Java Locale object that contains the language and country codes of the collaboration locale. This Locale object must be an instance of the java.util.Locale class.

Notes

The getLocale() method returns the locale of the current flow. This flow locale is the locale associated with the collaboration object's triggering business object.

Examples

The following example obtains the locale of the collaboration, retrieves the country and language codes from the Locale object, and then reports their values in a trace message:

Locale collaborationLocale = getLocale(); 
 String collaborationCountry = collaborationLocale.getCountry();
 String collaborationLanguage = collaborationLocale.getLanguage();
  
 trace(3, "THE COUNTRY CODE FOR THE COLLABORATION IS " + collaborationCountry + 
    ", AND THE LANGUAGE CODE FOR THE COLLABORATION IS " + collaborationLanguage +
    ".");
 

Copyright IBM Corp. 2003, 2004