## org.eclipse.datatools.connectivity.oda.design
Interface Locale

public interface Locale

Represents a specific geographical, political, or cultural region.

The following features are supported:

- `Language`
- `Country`
- `Variant`

See Also:
  `DesignPackage.getLocale()`

Field Summary
`static java.lang.String` `copyright`

Method Summary
`java.lang.String` `getCountry()` Returns the value of the 'Country' attribute.
`java.lang.String` `getLanguage()` Returns the value of the 'Language' attribute.
`ULocale` `getLocale()` Returns the locale value as an ULocale object.
`java.lang.String` `getVariant()` Returns the value of the 'Variant' attribute.
`boolean` `isSetLanguage()` Returns whether the value of the '`Language`' attribute is set.
`void` `setCountry(java.lang.String value)` Sets the value of the '`Country`' attribute.
`void` `setLanguage(java.lang.String value)` Sets the value of the '`Language`' attribute.
`void` `setLocale(ULocale locale)` Sets all the locale values.
`void` `setVariant(java.lang.String value)` Sets the value of the '`Variant`' attribute.
`java.lang.String` `toLanguageCountryString()` Getter for the programmatic name of the entire locale, with the language and country separated by underbars.
`void` `unsetLanguage()` Unsets the value of the '`Language`' attribute.

Field Detail

### copyright

    public static final java.lang.String copyright

  See Also:
    Constant Field Values

Method Detail

### getLocale

    public ULocale getLocale()

  Returns the locale value as an ULocale object.

  Returns:
    a com.ibm.icu.util.ULocale object

### setLocale

    public void setLocale(ULocale locale)

  Sets all the locale values.

### toLanguageCountryString

    public java.lang.String toLanguageCountryString()

  Getter for the programmatic name of the entire locale, with the language and country separated by underbars. Language is always lower case, and country is always upper case. If the required language is missing, this function will return the default locale's value. The variant value, if any, is ignored. Examples: "en", "de", "de_DE".

  Returns:
    a string representation of the locale's language and country.

### getLanguage

    public java.lang.String getLanguage()

  Returns the value of the 'Language' attribute. The default value is `"en"`. An ISO Language Code; lower-case, two-letter codes as defined by ISO-639.

  Returns:
    the value of the 'Language' attribute.
  See Also:
    `isSetLanguage()`, `unsetLanguage()`, `setLanguage(String)`, `DesignPackage.getLocale_Language()`

### setLanguage

    public void setLanguage(java.lang.String value)

  Sets the value of the '`Language`' attribute.

  Parameters:
    `value` - the new value of the 'Language' attribute.
  See Also:
    `isSetLanguage()`, `unsetLanguage()`, `getLanguage()`

### unsetLanguage

    public void unsetLanguage()

  Unsets the value of the '`Language`' attribute.

  See Also:
    `isSetLanguage()`, `getLanguage()`, `setLanguage(String)`

### isSetLanguage

    public boolean isSetLanguage()

  Returns whether the value of the '`Language`' attribute is set.

  Returns:
    whether the value of the 'Language' attribute is set.
  See Also:
    `unsetLanguage()`, `getLanguage()`, `setLanguage(String)`

### getCountry

    public java.lang.String getCountry()

  Returns the value of the 'Country' attribute. An ISO Country Code; upper-case, two-letter codes as defined by ISO-3166.

  Returns:
    the value of the 'Country' attribute.
  See Also:
    `setCountry(String)`, `DesignPackage.getLocale_Country()`

### setCountry

    public void setCountry(java.lang.String value)

  Sets the value of the '`Country`' attribute.

  Parameters:
    `value` - the new value of the 'Country' attribute.
  See Also:
    `getCountry()`

### getVariant

    public java.lang.String getVariant()

  Returns the value of the 'Variant' attribute. A vendor or browser-specific code.

  Returns:
    the value of the 'Variant' attribute.
  See Also:
    `setVariant(String)`, `DesignPackage.getLocale_Variant()`

### setVariant

    public void setVariant(java.lang.String value)

  Sets the value of the '`Variant`' attribute.

  Parameters:
    `value` - the new value of the 'Variant' attribute.
  See Also:
    `getVariant()`

Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.