1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_lang_Locale_idl__
20 #define __com_sun_star_lang_Locale_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
26 module com
{ module sun
{ module star
{ module lang
{
28 /** object represents a specific geographical, political, or cultural region.
30 <p>An operation that requires a <code>Locale</code> to perform
31 its task is called <em>locale-sensitive</em> and uses the
32 <code>Locale</code> to tailor information for the user. For example,
33 displaying a number is a locale-sensitive operation; the number
34 should be formatted according to the customs/conventions of the
35 user's native country, region, or culture. </p>
37 <p> Because a <code>Locale</code> object is just an identifier for a
38 region, no validity check is performed. If you want to see whether
39 particular resources are available for the <code>Locale</code>, use
40 the com::sun::star::resource::XLocale::getAvailableLocales() method to ask for the
41 locales it supports.</p>
43 <p> <strong>Note:</strong> When you ask for a resource for a
44 particular locale, you get the best available match, not necessarily
45 precisely what you asked for. For more information, see
46 com::sun::star::resource::XResourceBundle.</p>
48 <p> Each implementation that performs locale-sensitive operations
49 allows you to get all the available objects of that type. Use the
50 com::sun::star::resource::XLocale interface to set the locale. </p>
52 published
struct Locale
54 /** specifies an <strong>ISO 639 Language Code</strong>.
56 <p>These codes are preferably the lower-case two-letter codes as
57 defined by ISO 639-1, or three-letter codes as defined by ISO
58 639-3. You can find a full list of these codes at a number of
60 <a href="http://sil.org/iso639-3/codes.asp">
61 <code>http://sil.org/iso639-3/codes.asp</code></a>.
64 <p>If this field contains an empty string, the meaning depends on the
67 <p>Since LibreOffice 4.2, if the locale can not be represented
68 using only ISO 639 and ISO 3166 codes this field contains the
69 ISO 639-3 reserved for local use code "<strong>qlt</strong>" and
70 a <strong>BCP 47</strong> language tag is present in the Variant
75 /** specifies an <strong>ISO 3166 Country Code</strong>.
77 <p>These codes are the upper-case two-letter codes as
78 defined by ISO 3166-1. You can find a full list of these codes
79 at a number of sites, such as: <br/>
80 <a href="http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm">
81 <code>http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm</code></a>.
84 <p>If this field contains an empty string, the meaning depends on the
89 /** specifies a <strong>BCP 47</strong> Language Tag.
91 <p>Since LibreOffice 4.2, <strong>if</strong> the Language field
92 is the code "<strong>qlt</strong>" this field contains the full
93 BCP 47 language tag. If the Language field is not "qlt" this
96 <p>You can find BCP 47 language tag resources at <br/>
97 <a href="http://www.langtag.net/">
98 <code>http://www.langtag.net/</code></a>. </p>
100 <p>Earlier versions of the documentation mentioned "vendor and
101 browser-specific" codes but that was never supported. Use of any
102 arbitrary strings in the Variant field that do not form a valid
103 BCP 47 language tag is <strong>strongly deprecated</strong>.
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */