WordTemplate Class open setLocale setDataSource process save |
WordTemplate.setLocale Method |
public void setLocale
(java.util.Locale locale)
The setLocale
method allows you to override the server's default
locale when generating a new Word file. For example, to generate a US English document
on a French operating system, you could use setLocale
to set the
Word file's locale to US English. setLocale
sets the formatting of
dates, numbers, and currency to the specified locale
.
locale
java.util.Locale
object, or null
to set the document's locale to the system default locale. The
java.util.Locale
object represents information
about a culture including its alphabet, calendar, and date formats. The
locale
must specify both language and country.Locale
object, use this constructor:
Locale(String language, String country)
The language
argument is a valid lower-case, two-letter
ISO Language Code. A list of language codes is available at:
http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt.country
argument is a valid upper-case, two-letter
ISO Country Code. A list of country codes is available at:
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html.Locale
class's constants.
These represent both language and country. For example,
Locale.US
is a constant field that represents "en_US".
For more information on the Locale
class and a list of
constants, see
Class Locale.oWW.setLocale(new java.util.Locale("en", "US");
oWW.setLocale(java.util.Locale.US);
java.util.Locale locEnUs = new java.util.Locale("en", "US");
oWW.setLocale(locEnUs);
WordTemplate Class open setLocale setDataSource process save |