⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uloc.h

📁 linux下开源浏览器WebKit的源码,市面上的很多商用浏览器都是移植自WebKit
💻 H
📖 第 1 页 / 共 3 页
字号:
 * Allow user to select whether she wants information on  * requested, valid or actual locale. * For example, a collator for "en_US_CALIFORNIA" was * requested. In the current state of ICU (2.0),  * the requested locale is "en_US_CALIFORNIA", * the valid locale is "en_US" (most specific locale supported by ICU) * and the actual locale is "root" (the collation data comes unmodified  * from the UCA) * The locale is considered supported by ICU if there is a core ICU bundle  * for that locale (although it may be empty). * @stable ICU 2.1 */typedef enum {  /** This is locale the data actually comes from    * @stable ICU 2.1   */  ULOC_ACTUAL_LOCALE    = 0,  /** This is the most specific locale supported by ICU    * @stable ICU 2.1   */  ULOC_VALID_LOCALE    = 1,#ifndef U_HIDE_DEPRECATED_API  /** This is the requested locale   *  @deprecated ICU 2.8    */  ULOC_REQUESTED_LOCALE = 2,#endif /* U_HIDE_DEPRECATED_API */  ULOC_DATA_LOCALE_TYPE_LIMIT} ULocDataLocaleType ;/** * Gets ICU's default locale.   * The returned string is a snapshot in time, and will remain valid *   and unchanged even when uloc_setDefault() is called. *   The returned storage is owned by ICU, and must not be altered or deleted *   by the caller. *   * @return the ICU default locale * @system * @stable ICU 2.0 */U_STABLE const char* U_EXPORT2uloc_getDefault(void);/** * Sets ICU's default locale.   *    By default (without calling this function), ICU's default locale will be based *    on information obtained from the underlying system environment. *    <p> *    Changes to ICU's default locale do not propagate back to the *    system environment. *    <p> *    Changes to ICU's default locale to not affect any ICU services that *    may already be open based on the previous default locale value. * * @param localeID the new ICU default locale. A value of NULL will try to get *                 the system's default locale. * @param status the error information if the setting of default locale fails * @system * @stable ICU 2.0 */U_STABLE void U_EXPORT2uloc_setDefault(const char* localeID,        UErrorCode*       status);/** * Gets the language code for the specified locale. * * @param localeID the locale to get the ISO language code with * @param language the language code for localeID * @param languageCapacity the size of the language buffer to store the   * language code with * @param err error information if retrieving the language code failed * @return the actual buffer size needed for the language code.  If it's greater  * than languageCapacity, the returned language code will be truncated.   * @stable ICU 2.0 */U_STABLE int32_t U_EXPORT2uloc_getLanguage(const char*    localeID,         char* language,         int32_t languageCapacity,         UErrorCode* err);/** * Gets the script code for the specified locale. * * @param localeID the locale to get the ISO language code with * @param script the language code for localeID * @param scriptCapacity the size of the language buffer to store the   * language code with * @param err error information if retrieving the language code failed * @return the actual buffer size needed for the language code.  If it's greater  * than scriptCapacity, the returned language code will be truncated.   * @draft ICU 2.8 */U_DRAFT int32_t U_EXPORT2uloc_getScript(const char*    localeID,         char* script,         int32_t scriptCapacity,         UErrorCode* err);/** * Gets the  country code for the specified locale. * * @param localeID the locale to get the country code with * @param country the country code for localeID * @param countryCapacity the size of the country buffer to store the   * country code with * @param err error information if retrieving the country code failed * @return the actual buffer size needed for the country code.  If it's greater  * than countryCapacity, the returned country code will be truncated.   * @stable ICU 2.0 */U_DRAFT int32_t U_EXPORT2uloc_getCountry(const char*    localeID,        char* country,        int32_t countryCapacity,        UErrorCode* err);/** * Gets the variant code for the specified locale. * * @param localeID the locale to get the variant code with * @param variant the variant code for localeID * @param variantCapacity the size of the variant buffer to store the  * variant code with * @param err error information if retrieving the variant code failed * @return the actual buffer size needed for the variant code.  If it's greater  * than variantCapacity, the returned variant code will be truncated.   * @stable ICU 2.0 */U_STABLE int32_t U_EXPORT2uloc_getVariant(const char*    localeID,        char* variant,        int32_t variantCapacity,        UErrorCode* err);/** * Gets the full name for the specified locale. * Note: This has the effect of 'canonicalizing' the ICU locale ID to * a certain extent. Upper and lower case are set as needed. * It does NOT map aliased names in any way. * See the top of this header file. * This API supports preflighting. * * @param localeID the locale to get the full name with * @param name fill in buffer for the name without keywords. * @param nameCapacity capacity of the fill in buffer. * @param err error information if retrieving the full name failed * @return the actual buffer size needed for the full name.  If it's greater  * than nameCapacity, the returned full name will be truncated.   * @stable ICU 2.0 */U_STABLE int32_t U_EXPORT2uloc_getName(const char*    localeID,         char* name,         int32_t nameCapacity,         UErrorCode* err);/** * Gets the full name for the specified locale. * Note: This has the effect of 'canonicalizing' the string to * a certain extent. Upper and lower case are set as needed, * and if the components were in 'POSIX' format they are changed to * ICU format.  It does NOT map aliased names in any way. * See the top of this header file. * * @param localeID the locale to get the full name with * @param name the full name for localeID * @param nameCapacity the size of the name buffer to store the  * full name with * @param err error information if retrieving the full name failed * @return the actual buffer size needed for the full name.  If it's greater  * than nameCapacity, the returned full name will be truncated.   * @draft ICU 2.8 */U_DRAFT int32_t U_EXPORT2uloc_canonicalize(const char*    localeID,         char* name,         int32_t nameCapacity,         UErrorCode* err);/** * Gets the ISO language code for the specified locale. * * @param localeID the locale to get the ISO language code with * @return language the ISO language code for localeID * @stable ICU 2.0 */U_STABLE const char* U_EXPORT2uloc_getISO3Language(const char* localeID);/** * Gets the ISO country code for the specified locale. * * @param localeID the locale to get the ISO country code with * @return country the ISO country code for localeID * @stable ICU 2.0 */U_STABLE const char* U_EXPORT2uloc_getISO3Country(const char* localeID);/** * Gets the Win32 LCID value for the specified locale. * If the ICU locale is not recognized by Windows, 0 will be returned. * * @param localeID the locale to get the Win32 LCID value with * @return country the Win32 LCID for localeID * @stable ICU 2.0 */U_STABLE uint32_t U_EXPORT2uloc_getLCID(const char* localeID);/** * Gets the language name suitable for display for the specified locale. * * @param locale the locale to get the ISO language code with * @param displayLocale Specifies the locale to be used to display the name.  In other words, *                 if the locale's language code is "en", passing Locale::getFrench() for *                 inLocale would result in "Anglais", while passing Locale::getGerman() *                 for inLocale would result in "Englisch". * @param language the displayable language code for localeID * @param languageCapacity the size of the language buffer to store the   * displayable language code with * @param status error information if retrieving the displayable language code failed * @return the actual buffer size needed for the displayable language code.  If it's greater  * than languageCapacity, the returned language code will be truncated.   * @stable ICU 2.0 */U_STABLE int32_t U_EXPORT2uloc_getDisplayLanguage(const char* locale,            const char* displayLocale,            UChar* language,            int32_t languageCapacity,            UErrorCode* status);/** * Gets the script name suitable for display for the specified locale. * * @param locale the locale to get the displayable script code with. NULL may be used to specify the default. * @param displayLocale Specifies the locale to be used to display the name.  In other words, *                 if the locale's language code is "en", passing Locale::getFrench() for *                 inLocale would result in "", while passing Locale::getGerman() *                 for inLocale would result in "". NULL may be used to specify the default. * @param script the displayable country code for localeID * @param scriptCapacity the size of the script buffer to store the   * displayable script code with * @param status error information if retrieving the displayable script code failed * @return the actual buffer size needed for the displayable script code.  If it's greater  * than scriptCapacity, the returned displayable script code will be truncated.   * @draft ICU 2.8 */U_DRAFT int32_t U_EXPORT2uloc_getDisplayScript(const char* locale,            const char* displayLocale,            UChar* script,            int32_t scriptCapacity,            UErrorCode* status);/** * Gets the country name suitable for display for the specified locale. * * @param locale the locale to get the displayable country code with. NULL may be used to specify the default. * @param displayLocale Specifies the locale to be used to display the name.  In other words, *                 if the locale's language code is "en", passing Locale::getFrench() for *                 inLocale would result in "Anglais", while passing Locale::getGerman() *                 for inLocale would result in "Englisch". NULL may be used to specify the default. * @param country the displayable country code for localeID * @param countryCapacity the size of the country buffer to store the   * displayable country code with * @param status error information if retrieving the displayable country code failed * @return the actual buffer size needed for the displayable country code.  If it's greater  * than countryCapacity, the returned displayable country code will be truncated.   * @stable ICU 2.0 */U_STABLE int32_t U_EXPORT2uloc_getDisplayCountry(const char* locale,                       const char* displayLocale,                       UChar* country,                       int32_t countryCapacity,                       UErrorCode* status);/** * Gets the variant name suitable for display for the specified locale. * * @param locale the locale to get the displayable variant code with. NULL may be used to specify the default. * @param displayLocale Specifies the locale to be used to display the name.  In other words, *                 if the locale's language code is "en", passing Locale::getFrench() for *                 inLocale would result in "Anglais", while passing Locale::getGerman() *                 for inLocale would result in "Englisch". NULL may be used to specify the default. * @param variant the displayable variant code for localeID * @param variantCapacity the size of the variant buffer to store the  * displayable variant code with * @param status error information if retrieving the displayable variant code failed * @return the actual buffer size needed for the displayable variant code.  If it's greater  * than variantCapacity, the returned displayable variant code will be truncated.   * @stable ICU 2.0 */U_STABLE int32_t U_EXPORT2uloc_getDisplayVariant(const char* locale,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -