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 .
22 module com
{ module sun
{ module star
{ module lang
{
24 /** object represents a specific geographical, political, or cultural region.
26 <p>An operation that requires a <code>Locale</code> to perform
27 its task is called <em>locale-sensitive</em> and uses the
28 <code>Locale</code> to tailor information for the user. For example,
29 displaying a number is a locale-sensitive operation; the number
30 should be formatted according to the customs/conventions of the
31 user's native country, region, or culture. </p>
33 published
struct Locale
35 /** specifies an <strong>ISO 639 Language Code</strong>.
37 <p>These codes are preferably the lower-case two-letter codes as
38 defined by ISO 639-1, or three-letter codes as defined by ISO
39 639-3. You can find a full list of these codes at a number of
41 <a href="https://iso639-3.sil.org/code_tables/639/data">
42 <code>https://iso639-3.sil.org/code_tables/639/data</code></a>.
45 <p>If this field contains an empty string, the meaning depends on the
48 <p>Since LibreOffice 4.2, if the locale can not be represented
49 using only ISO 639 and ISO 3166 codes this field contains the
50 ISO 639-3 reserved for local use code <strong>"qlt"</strong> and
51 a <strong>BCP 47</strong> language tag is present in the Variant
56 /** specifies an <strong>ISO 3166 Country Code</strong>.
58 <p>These codes are the upper-case two-letter codes as
59 defined by ISO 3166-1. You can find a full list of these codes
60 at a number of sites, such as: <br/>
61 <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">
62 <code>https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2</code></a>.
65 <p>If this field contains an empty string, the meaning depends on the
70 /** specifies a <strong>BCP 47</strong> Language Tag.
72 <p>Since LibreOffice 4.2, <strong>if</strong> the Language field
73 is the code <strong>"qlt"</strong> this field contains the full
74 BCP 47 language tag. If the Language field is not "qlt" this
77 <p>You can find BCP 47 language tag resources at <br/>
78 <a href="https://en.wikipedia.org/wiki/IETF_language_tag">
79 <code>https://en.wikipedia.org/wiki/IETF_language_tag</code></a> and
80 <a href="https://www.w3.org/International/articles/language-tags/">
81 <code>https://www.w3.org/International/articles/language-tags/</code></a>. </p>
83 <p>Earlier versions of the documentation mentioned "vendor and
84 browser-specific" codes but that was never supported. Use of any
85 arbitrary strings in the Variant field that do not form a valid
86 BCP 47 language tag is <strong>strongly deprecated</strong>.
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */