Lines Matching refs:language
111 const char * const language; /* Language ID */ member
164 char *language,/* I - Language ID buffer */ in _cupsAppleLanguage() argument
184 strlcpy(language, "en", langsize); in _cupsAppleLanguage()
188 strlcpy(language, locale, langsize); in _cupsAppleLanguage()
192 strlcpy(language, locale, langsize); in _cupsAppleLanguage()
194 if (language[2] == '-') in _cupsAppleLanguage()
200 language[2] = '_'; in _cupsAppleLanguage()
201 language[3] = (char)toupper(language[3] & 255); in _cupsAppleLanguage()
202 language[4] = (char)toupper(language[4] & 255); in _cupsAppleLanguage()
213 strlcpy(language, apple_language_locale[i].language, sizeof(language)); in _cupsAppleLanguage()
221 if ((localeid = CFStringCreateWithCString(kCFAllocatorDefault, language, in _cupsAppleLanguage()
227 CFStringGetCString(langid, language, (CFIndex)langsize, kCFStringEncodingASCII); in _cupsAppleLanguage()
238 return (language); in _cupsAppleLanguage()
287 size_t len = strlen(apple_language_locale[i].language); in _cupsAppleLocale()
289 if (!strcmp(locale, apple_language_locale[i].language) || in _cupsAppleLocale()
290 …(!strncmp(locale, apple_language_locale[i].language, len) && (locale[len] == '_' || locale[len] ==… in _cupsAppleLocale()
446 cupsLangGet(const char *language) /* I - Language or locale */ in cupsLangGet() argument
503 DEBUG_printf(("2cupsLangGet(language=\"%s\")", language)); in cupsLangGet()
517 if (!language) in cupsLangGet()
519 if (!getenv("SOFTWARE") || (language = getenv("LANG")) == NULL) in cupsLangGet()
520 language = appleLangDefault(); in cupsLangGet()
522 DEBUG_printf(("4cupsLangGet: language=\"%s\"", language)); in cupsLangGet()
538 if (!language) in cupsLangGet()
590 language = locale; in cupsLangGet()
599 DEBUG_printf(("4cupsLangGet: new language value is \"%s\"", language)); in cupsLangGet()
609 if (!language) in cupsLangGet()
615 language = "C"; in cupsLangGet()
659 if (language == NULL || !language[0] || in cupsLangGet()
660 !strcmp(language, "POSIX")) in cupsLangGet()
668 for (ptr = langname; *language; language ++) in cupsLangGet()
669 if (*language == '_' || *language == '-' || *language == '.') in cupsLangGet()
672 *ptr++ = (char)tolower(*language & 255); in cupsLangGet()
676 if (*language == '_' || *language == '-') in cupsLangGet()
682 for (language ++, ptr = country; *language; language ++) in cupsLangGet()
683 if (*language == '.') in cupsLangGet()
686 *ptr++ = (char)toupper(*language & 255); in cupsLangGet()
694 if (!strcmp(language, "zh") && !strcmp(country, "HANS")) in cupsLangGet()
696 if (!strcmp(language, "zh") && !strcmp(country, "HANT")) in cupsLangGet()
700 if (*language == '.' && !charset[0]) in cupsLangGet()
706 for (language ++, ptr = charset; *language; language ++) in cupsLangGet()
707 if (_cups_isalnum(*language) && ptr < (charset + sizeof(charset) - 1)) in cupsLangGet()
708 *ptr++ = (char)toupper(*language & 255); in cupsLangGet()
827 strlcpy(lang->language, real, sizeof(lang->language)); in cupsLangGet()
1305 if (!cg->language[0]) in appleLangDefault()
1310 strlcpy(cg->language, lang, sizeof(cg->language)); in appleLangDefault()
1311 return (cg->language); in appleLangDefault()
1378 if (_cupsAppleLocale(languageName, cg->language, sizeof(cg->language))) in appleLangDefault()
1380 cg->language)); in appleLangDefault()
1393 if (!cg->language[0]) in appleLangDefault()
1396 strlcpy(cg->language, "en_US.UTF-8", sizeof(cg->language)); in appleLangDefault()
1400 DEBUG_printf(("3appleLangDefault: Using previous locale \"%s\".", cg->language)); in appleLangDefault()
1406 return (cg->language); in appleLangDefault()
1625 "encoding=%d(%s)", (void *)lang, lang->language, lang->encoding, in cups_cache_lookup()
1628 if (!strcmp(lang->language, name) && in cups_cache_lookup()
1683 lang->strings = appleMessageLoad(lang->language); in cups_message_load()
1692 lang->language, lang->language); in cups_message_load()
1694 if (strchr(lang->language, '_') && access(filename, 0)) in cups_message_load()
1701 lang->language, lang->language); in cups_message_load()