Home | History | Annotate | Download | only in common

Lines Matching refs:localeID

57 locale_getKeywords(const char *localeID,
556 locale_getKeywordsStart(const char *localeID) {
558 if((result = uprv_strchr(localeID, '@')) != NULL) {
569 if((result = uprv_strchr(localeID, *charToFind)) != NULL) {
626 _getKeywords(const char *localeID,
639 const char* pos = localeID;
793 locale_getKeywords(const char *localeID,
799 return _getKeywords(localeID, prev, keywords, keywordCapacity,
805 uloc_getKeywordValue(const char* localeID,
816 if(status && U_SUCCESS(*status) && localeID) {
818 const char* startSearchHere = uprv_strchr(localeID, '@'); /* TODO: REVISIT: shouldn't this be locale_getKeywordsStart ? */
1188 _getLanguage(const char *localeID,
1196 if(_isIDPrefix(localeID)) {
1198 language[i]=(char)uprv_tolower(*localeID);
1204 localeID+=2;
1208 while(!_isTerminator(*localeID) && !_isIDSeparator(*localeID)) {
1210 language[i]=(char)uprv_tolower(*localeID);
1213 lang[i]=(char)uprv_tolower(*localeID);
1216 localeID++;
1228 *pEnd=localeID;
1234 _getScript(const char *localeID,
1241 *pEnd = localeID;
1245 while(!_isTerminator(localeID[idLen]) && !_isIDSeparator(localeID[idLen])) {
1253 *pEnd = localeID+idLen;
1259 script[0]=(char)uprv_toupper(*(localeID++));
1262 script[i]=(char)uprv_tolower(*(localeID++));
1272 _getCountry(const char *localeID,
1281 while(!_isTerminator(*localeID) && !_isIDSeparator(*localeID)) {
1283 country[i]=(char)uprv_toupper(*localeID);
1286 cnty[i]=(char)uprv_toupper(*localeID);
1289 localeID++;
1301 *pEnd=localeID;
1311 _getVariantEx(const char *localeID,
1320 while(!_isTerminator(*localeID)) {
1329 variant[i]=(char)uprv_toupper(*localeID);
1335 localeID++;
1342 /* keep localeID */
1343 } else if((localeID=locale_getKeywordsStart(localeID))!=NULL) {
1344 ++localeID; /* point after the '@' */
1348 while(!_isTerminator(*localeID)) {
1357 variant[i]=(char)uprv_toupper(*localeID);
1363 localeID++;
1371 _getVariant(const char *localeID,
1374 return _getVariantEx(localeID, prev, variant, variantCapacity, FALSE);
1511 uloc_openKeywords(const char* localeID,
1521 if(localeID==NULL) {
1522 localeID=uloc_getDefault();
1526 _getLanguage(localeID, NULL, 0, &localeID);
1527 if(_isIDSeparator(*localeID)) {
1530 _getScript(localeID+1, NULL, 0, &scriptID);
1531 if(scriptID != localeID+1) {
1533 localeID = scriptID;
1536 if (_isIDSeparator(*localeID)) {
1537 _getCountry(localeID+1, NULL, 0, &localeID);
1538 if(_isIDSeparator(*localeID)) {
1539 _getVariant(localeID+1, *localeID, NULL, 0);
1545 if((localeID = locale_getKeywordsStart(localeID)) != NULL) {
1546 i=locale_getKeywords(localeID+1, '@', keywords, keywordsCapacity, NULL, 0, NULL, FALSE, status);
1567 * Canonicalize the given localeID, to level 1 or to level 2,
1574 _canonicalize(const char* localeID,
1593 if (localeID==NULL) {
1594 localeID=uloc_getDefault();
1596 origLocaleID=localeID;
1610 len=_getLanguage(localeID, name, nameCapacity, &localeID);
1620 } else if(_isIDSeparator(*localeID)) {
1629 scriptSize=_getScript(localeID+1, name+len, nameCapacity-len, &scriptID);
1632 localeID = scriptID;
1635 if (_isIDSeparator(*localeID)) {
1644 if (_isIDSeparator(*localeID)) {
1645 len+=_getCountry(localeID+1, name+len, nameCapacity-len, &localeID);
1646 if(_isIDSeparator(*localeID)) {
1652 variantSize = _getVariant(localeID+1, *localeID, name+len, nameCapacity-len);
1656 localeID += variantSize + 1; /* skip '_' and variant */
1663 if (!OPTION_SET(options, _ULOC_CANONICALIZE) && *localeID == '.') {
1666 char c = *localeID;
1677 ++localeID;
1684 After this, localeID either points to '@' or is NULL */
1685 if ((localeID=locale_getKeywordsStart(localeID))!=NULL) {
1686 keywordAssign = uprv_strchr(localeID, '=');
1687 separatorIndicator = uprv_strchr(localeID, ';');
1692 localeID != NULL && keywordAssign == NULL) {
1694 char c = *localeID;
1702 ++localeID;
1708 if (localeID!=NULL && keywordAssign==NULL) {
1720 posixVariantSize = _getVariantEx(localeID+1, '@', name+len, nameCapacity-len,
1757 if (n == 0 && localeID != NULL) {
1771 if (localeID!=NULL && keywordAssign!=NULL &&
1778 len += _getKeywords(localeID+1, '@', name+len, nameCapacity-len, NULL, 0, NULL, TRUE,
1800 uloc_getParent(const char* localeID,
1811 if (localeID == NULL)
1812 localeID = uloc_getDefault();
1814 lastUnderscore=uprv_strrchr(localeID, '_');
1816 i=(int32_t)(lastUnderscore-localeID);
1821 if(i>0 && parent != localeID) {
1822 uprv_memcpy(parent, localeID, uprv_min(i, parentCapacity));
1828 uloc_getLanguage(const char* localeID,
1840 if(localeID==NULL) {
1841 localeID=uloc_getDefault();
1844 i=_getLanguage(localeID, language, languageCapacity, NULL);
1849 uloc_getScript(const char* localeID,
1860 if(localeID==NULL) {
1861 localeID=uloc_getDefault();
1865 _getLanguage(localeID, NULL, 0, &localeID);
1866 if(_isIDSeparator(*localeID)) {
1867 i=_getScript(localeID+1, script, scriptCapacity, NULL);
1873 uloc_getCountry(const char* localeID,
1884 if(localeID==NULL) {
1885 localeID=uloc_getDefault();
1889 _getLanguage(localeID, NULL, 0, &localeID);
1890 if(_isIDSeparator(*localeID)) {
1893 _getScript(localeID+1, NULL, 0, &scriptID);
1894 if(scriptID != localeID+1) {
1896 localeID = scriptID;
1898 if(_isIDSeparator(*localeID)) {
1899 i=_getCountry(localeID+1, country, countryCapacity, NULL);
1906 uloc_getVariant(const char* localeID,
1917 if(localeID==NULL) {
1918 localeID=uloc_getDefault();
1922 _getLanguage(localeID, NULL, 0, &localeID);
1923 if(_isIDSeparator(*localeID)) {
1926 _getScript(localeID+1, NULL, 0, &scriptID);
1927 if(scriptID != localeID+1) {
1929 localeID = scriptID;
1932 if (_isIDSeparator(*localeID)) {
1933 _getCountry(localeID+1, NULL, 0, &localeID);
1934 if(_isIDSeparator(*localeID)) {
1935 i=_getVariant(localeID+1, *localeID, variant, variantCapacity);
1943 if(!haveVariant && (localeID=uprv_strrchr(localeID, '@'))!=NULL) {
1944 i=_getVariant(localeID+1, '@', variant, variantCapacity);
1951 uloc_getName(const char* localeID,
1956 return _canonicalize(localeID, name, nameCapacity, 0, err);
1960 uloc_getBaseName(const char* localeID,
1965 return _canonicalize(localeID, name, nameCapacity, _ULOC_STRIP_KEYWORDS, err);
1969 uloc_canonicalize(const char* localeID,
1974 return _canonicalize(localeID, name, nameCapacity, _ULOC_CANONICALIZE, err);
1978 uloc_getISO3Language(const char* localeID)
1984 if (localeID == NULL)
1986 localeID = uloc_getDefault();
1988 uloc_getLanguage(localeID, lang, ULOC_LANG_CAPACITY, &err);
1998 uloc_getISO3Country(const char* localeID)
2004 if (localeID == NULL)
2006 localeID = uloc_getDefault();
2008 uloc_getCountry(localeID, cntry, ULOC_LANG_CAPACITY, &err);
2019 uloc_getLCID(const char* localeID)
2024 uloc_getLanguage(localeID, langID, sizeof(langID), &status);
2029 return uprv_convertToLCID(langID, localeID, &status);
2838 _uloc_getOrientationHelper(const char* localeId,
2848 uloc_canonicalize(localeId, localeBuffer, sizeof(localeBuffer), status);
2888 uloc_getCharacterOrientation(const char* localeId,
2891 return _uloc_getOrientationHelper(localeId, "characters", status);
2897 * @param localeID locale name
2903 uloc_getLineOrientation(const char* localeId,
2906 return _uloc_getOrientationHelper(localeId, "lines", status);
3165 * This function looks for the localeID in the likelySubtags resource.
3167 * @param localeID The tag to find.
3173 findLikelySubtags(const char* localeID,
3185 s = ures_getStringByKey(subtags, localeID, &resLen, &tmpErr);
3580 * @param localeID The locale ID to parse.
3588 * @return The number of chars of the localeID parameter consumed.
3592 const char* localeID,
3601 const char* position = localeID;
3605 localeID == NULL ||
3688 return (int32_t)(position - localeID);
3958 _uloc_addLikelySubtags(const char* localeID,
3977 else if (localeID == NULL ||
3984 localeID,
4002 trailing = &localeID[trailingIndex];
4021 uprv_strlen(localeID);
4024 * If we get here, we need to return localeID.
4028 localeID,
4052 _uloc_minimizeSubtags(const char* localeID,
4079 else if (localeID == NULL ||
4087 localeID,
4106 trailing = &localeID[trailingIndex];
4276 const int32_t localeIDLength = uprv_strlen(localeID);
4280 localeID,
4303 do_canonicalize(const char* localeID,
4309 localeID,
4330 uloc_addLikelySubtags(const char* localeID,
4338 localeID,
4354 uloc_minimizeSubtags(const char* localeID,
4362 localeID,