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