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