xref: /aoo4110/main/udkapi/com/sun/star/lang/Locale.idl (revision b1cdbd2c)
1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_lang_Locale_idl__
24*b1cdbd2cSJim Jagielski#define __com_sun_star_lang_Locale_idl__
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski#include <com/sun/star/uno/XInterface.idl>
27*b1cdbd2cSJim Jagielski
28*b1cdbd2cSJim Jagielski
29*b1cdbd2cSJim Jagielski//=============================================================================
30*b1cdbd2cSJim Jagielski
31*b1cdbd2cSJim Jagielskimodule com {  module sun {  module star {  module lang {
32*b1cdbd2cSJim Jagielski
33*b1cdbd2cSJim Jagielski//=============================================================================
34*b1cdbd2cSJim Jagielski
35*b1cdbd2cSJim Jagielski// DocMerge from xml: struct com::sun::star::lang::Locale
36*b1cdbd2cSJim Jagielski/** object represents a specific geographical, political, or cultural region.
37*b1cdbd2cSJim Jagielski
38*b1cdbd2cSJim Jagielski	<p>An operation that requires a <code>Locale</code> to perform
39*b1cdbd2cSJim Jagielski	its task is called <em>locale-sensitive</em> and uses the
40*b1cdbd2cSJim Jagielski	<code>Locale</code> to tailor information for the user. For example,
41*b1cdbd2cSJim Jagielski	displaying a number is a locale-sensitive operation; the number
42*b1cdbd2cSJim Jagielski	should be formatted according to the customs/conventions of the
43*b1cdbd2cSJim Jagielski	user's native country, region, or culture.  </p>
44*b1cdbd2cSJim Jagielski
45*b1cdbd2cSJim Jagielski	<p> Because a <code>Locale</code> object is just an identifier for a
46*b1cdbd2cSJim Jagielski	region, no validity check is performed.  If you want to see whether
47*b1cdbd2cSJim Jagielski	particular resources are available for the <code>Locale</code>, use
48*b1cdbd2cSJim Jagielski	the <method scope="com::sun::star::resource">XLocale::getAvailableLocales</method> method to ask for the
49*b1cdbd2cSJim Jagielski	locales it supports.</p>
50*b1cdbd2cSJim Jagielski
51*b1cdbd2cSJim Jagielski	<p> <strong>Note:</strong> When you ask for a resource for a
52*b1cdbd2cSJim Jagielski	particular locale, you get the best available match, not necessarily
53*b1cdbd2cSJim Jagielski	precisely what you asked for. For more information, see
54*b1cdbd2cSJim Jagielski	<type scope="com::sun::star::resource">XResourceBundle</type>.</p>
55*b1cdbd2cSJim Jagielski
56*b1cdbd2cSJim Jagielski	<p> Each implementation that performs locale-sensitive operations
57*b1cdbd2cSJim Jagielski	allows you to get all the available objects of that type. Use the
58*b1cdbd2cSJim Jagielski	<typed scope="com::sun::star::resource">XLocale</type> interface to set the locale. </p>
59*b1cdbd2cSJim Jagielski */
60*b1cdbd2cSJim Jagielskipublished struct Locale
61*b1cdbd2cSJim Jagielski{
62*b1cdbd2cSJim Jagielski	// DocMerge from xml: field com::sun::star::lang::Locale::Language
63*b1cdbd2cSJim Jagielski	/** specifies an <strong>ISO Language Code</strong>.
64*b1cdbd2cSJim Jagielski
65*b1cdbd2cSJim Jagielski		<p>These codes are the lower-case two-letter codes as defined by
66*b1cdbd2cSJim Jagielski		ISO-639. You can find a full list of these codes at a number of
67*b1cdbd2cSJim Jagielski		sites, such as: <br>
68*b1cdbd2cSJim Jagielski		<a href="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt">
69*b1cdbd2cSJim Jagielski		<code>http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt</code></a>.
70*b1cdbd2cSJim Jagielski		</p>
71*b1cdbd2cSJim Jagielski
72*b1cdbd2cSJim Jagielski		<p>If this field contains an empty string, the meaning depends on the
73*b1cdbd2cSJim Jagielski		context.</p>
74*b1cdbd2cSJim Jagielski	 */
75*b1cdbd2cSJim Jagielski	string Language;
76*b1cdbd2cSJim Jagielski
77*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
78*b1cdbd2cSJim Jagielski
79*b1cdbd2cSJim Jagielski	// DocMerge from xml: field com::sun::star::lang::Locale::Country
80*b1cdbd2cSJim Jagielski	/** specifies an <strong>ISO Country Code.</strong>
81*b1cdbd2cSJim Jagielski
82*b1cdbd2cSJim Jagielski		<p>These codes are the upper-case two-letter codes as
83*b1cdbd2cSJim Jagielski		defined by ISO-3166.  You can find a full list of these codes at a
84*b1cdbd2cSJim Jagielski		number of sites, such as: <br>
85*b1cdbd2cSJim Jagielski		<a href="http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html">
86*b1cdbd2cSJim Jagielski		<code>http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html</code></a>.
87*b1cdbd2cSJim Jagielski		</p>
88*b1cdbd2cSJim Jagielski
89*b1cdbd2cSJim Jagielski		<p>If this field contains an empty string, the meaning depends on the
90*b1cdbd2cSJim Jagielski		context.</p>
91*b1cdbd2cSJim Jagielski	 */
92*b1cdbd2cSJim Jagielski	string Country;
93*b1cdbd2cSJim Jagielski
94*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
95*b1cdbd2cSJim Jagielski
96*b1cdbd2cSJim Jagielski	// DocMerge from xml: field com::sun::star::lang::Locale::Variant
97*b1cdbd2cSJim Jagielski	/** contains a variant of the locale; codes are vendor and
98*b1cdbd2cSJim Jagielski		browser-specific.
99*b1cdbd2cSJim Jagielski
100*b1cdbd2cSJim Jagielski		<p>For example, use WIN for Windows, MAC for Macintosh, and POSIX
101*b1cdbd2cSJim Jagielski		for POSIX. Wherever there are two variants, separate them with an
102*b1cdbd2cSJim Jagielski		underscore, and put the most important one first. For example, a
103*b1cdbd2cSJim Jagielski		traditional Spanish collation might construct a locale with parameters
104*b1cdbd2cSJim Jagielski		for language, country and variant as: "es", "ES", "Traditional_WIN".</p>
105*b1cdbd2cSJim Jagielski	 */
106*b1cdbd2cSJim Jagielski	string Variant;
107*b1cdbd2cSJim Jagielski
108*b1cdbd2cSJim Jagielski};
109*b1cdbd2cSJim Jagielski
110*b1cdbd2cSJim Jagielski
111*b1cdbd2cSJim Jagielski//=============================================================================
112*b1cdbd2cSJim Jagielski
113*b1cdbd2cSJim Jagielski}; }; }; };
114*b1cdbd2cSJim Jagielski
115*b1cdbd2cSJim Jagielski/*=============================================================================
116*b1cdbd2cSJim Jagielski
117*b1cdbd2cSJim Jagielski=============================================================================*/
118*b1cdbd2cSJim Jagielski#endif
119