merged tag ooo/OOO330_m14
[LibreOffice.git] / udkapi / com / sun / star / lang / Locale.idl
blob40c43748b2d78a709426fe704ae698e70ce729a8
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_lang_Locale_idl__
28 #define __com_sun_star_lang_Locale_idl__
30 #include <com/sun/star/uno/XInterface.idl>
33 //=============================================================================
35 module com { module sun { module star { module lang {
37 //=============================================================================
39 // DocMerge from xml: struct com::sun::star::lang::Locale
40 /** object represents a specific geographical, political, or cultural region.
42 <p>An operation that requires a <code>Locale</code> to perform
43 its task is called <em>locale-sensitive</em> and uses the
44 <code>Locale</code> to tailor information for the user. For example,
45 displaying a number is a locale-sensitive operation; the number
46 should be formatted according to the customs/conventions of the
47 user's native country, region, or culture. </p>
49 <p> Because a <code>Locale</code> object is just an identifier for a
50 region, no validity check is performed. If you want to see whether
51 particular resources are available for the <code>Locale</code>, use
52 the <method scope="com::sun::star::resource">XLocale::getAvailableLocales</method> method to ask for the
53 locales it supports.</p>
55 <p> <strong>Note:</strong> When you ask for a resource for a
56 particular locale, you get the best available match, not necessarily
57 precisely what you asked for. For more information, see
58 <type scope="com::sun::star::resource">XResourceBundle</type>.</p>
60 <p> Each implementation that performs locale-sensitive operations
61 allows you to get all the available objects of that type. Use the
62 <typed scope="com::sun::star::resource">XLocale</type> interface to set the locale. </p>
64 published struct Locale
66 // DocMerge from xml: field com::sun::star::lang::Locale::Language
67 /** specifies an <strong>ISO Language Code</strong>.
69 <p>These codes are the lower-case two-letter codes as defined by
70 ISO-639. You can find a full list of these codes at a number of
71 sites, such as: <br>
72 <a href="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt">
73 <code>http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt</code></a>.
74 </p>
76 <p>If this field contains an empty string, the meaning depends on the
77 context.</p>
79 string Language;
81 //-------------------------------------------------------------------------
83 // DocMerge from xml: field com::sun::star::lang::Locale::Country
84 /** specifies an <strong>ISO Country Code.</strong>
86 <p>These codes are the upper-case two-letter codes as
87 defined by ISO-3166. You can find a full list of these codes at a
88 number of sites, such as: <br>
89 <a href="http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html">
90 <code>http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html</code></a>.
91 </p>
93 <p>If this field contains an empty string, the meaning depends on the
94 context.</p>
96 string Country;
98 //-------------------------------------------------------------------------
100 // DocMerge from xml: field com::sun::star::lang::Locale::Variant
101 /** contains a variant of the locale; codes are vendor and
102 browser-specific.
104 <p>For example, use WIN for Windows, MAC for Macintosh, and POSIX
105 for POSIX. Wherever there are two variants, separate them with an
106 underscore, and put the most important one first. For example, a
107 traditional Spanish collation might construct a locale with parameters
108 for language, country and variant as: "es", "ES", "Traditional_WIN".</p>
110 string Variant;
115 //=============================================================================
117 }; }; }; };
119 /*=============================================================================
121 =============================================================================*/
122 #endif