Lines Matching refs:language
116 const char * const language; /* Language ID */ member
170 char *language,/* I - Language ID buffer */ in _cupsAppleLanguage() argument
190 strlcpy(language, "en", langsize); in _cupsAppleLanguage()
194 strlcpy(language, locale, langsize); in _cupsAppleLanguage()
198 strlcpy(language, locale, langsize); in _cupsAppleLanguage()
200 if (language[2] == '-') in _cupsAppleLanguage()
206 language[2] = '_'; in _cupsAppleLanguage()
207 language[3] = (char)toupper(language[3] & 255); in _cupsAppleLanguage()
208 language[4] = (char)toupper(language[4] & 255); in _cupsAppleLanguage()
219 strlcpy(language, apple_language_locale[i].language, sizeof(language)); in _cupsAppleLanguage()
227 if ((localeid = CFStringCreateWithCString(kCFAllocatorDefault, language, in _cupsAppleLanguage()
233 CFStringGetCString(langid, language, (CFIndex)langsize, kCFStringEncodingASCII); in _cupsAppleLanguage()
244 return (language); in _cupsAppleLanguage()
293 size_t len = strlen(apple_language_locale[i].language); in _cupsAppleLocale()
295 if (!strcmp(locale, apple_language_locale[i].language) || in _cupsAppleLocale()
296 …(!strncmp(locale, apple_language_locale[i].language, len) && (locale[len] == '_' || locale[len] ==… in _cupsAppleLocale()
452 cupsLangGet(const char *language) /* I - Language or locale */ in cupsLangGet() argument
509 DEBUG_printf(("2cupsLangGet(language=\"%s\")", language)); in cupsLangGet()
523 if (!language) in cupsLangGet()
525 if (!getenv("SOFTWARE") || (language = getenv("LANG")) == NULL) in cupsLangGet()
526 language = appleLangDefault(); in cupsLangGet()
528 DEBUG_printf(("4cupsLangGet: language=\"%s\"", language)); in cupsLangGet()
544 if (!language) in cupsLangGet()
596 language = locale; in cupsLangGet()
605 DEBUG_printf(("4cupsLangGet: new language value is \"%s\"", language)); in cupsLangGet()
615 if (!language) in cupsLangGet()
621 language = "C"; in cupsLangGet()
665 if (language == NULL || !language[0] || in cupsLangGet()
666 !strcmp(language, "POSIX")) in cupsLangGet()
674 for (ptr = langname; *language; language ++) in cupsLangGet()
675 if (*language == '_' || *language == '-' || *language == '.') in cupsLangGet()
678 *ptr++ = (char)tolower(*language & 255); in cupsLangGet()
682 if (*language == '_' || *language == '-') in cupsLangGet()
688 for (language ++, ptr = country; *language; language ++) in cupsLangGet()
689 if (*language == '.') in cupsLangGet()
692 *ptr++ = (char)toupper(*language & 255); in cupsLangGet()
700 if (!strcmp(language, "zh") && !strcmp(country, "HANS")) in cupsLangGet()
702 if (!strcmp(language, "zh") && !strcmp(country, "HANT")) in cupsLangGet()
706 if (*language == '.' && !charset[0]) in cupsLangGet()
712 for (language ++, ptr = charset; *language; language ++) in cupsLangGet()
713 if (_cups_isalnum(*language) && ptr < (charset + sizeof(charset) - 1)) in cupsLangGet()
714 *ptr++ = (char)toupper(*language & 255); in cupsLangGet()
833 strlcpy(lang->language, real, sizeof(lang->language)); in cupsLangGet()
1261 if (!cg->language[0]) in appleLangDefault()
1266 strlcpy(cg->language, lang, sizeof(cg->language)); in appleLangDefault()
1267 return (cg->language); in appleLangDefault()
1334 if (_cupsAppleLocale(languageName, cg->language, sizeof(cg->language))) in appleLangDefault()
1336 cg->language)); in appleLangDefault()
1349 if (!cg->language[0]) in appleLangDefault()
1352 strlcpy(cg->language, "en_US.UTF-8", sizeof(cg->language)); in appleLangDefault()
1356 DEBUG_printf(("3appleLangDefault: Using previous locale \"%s\".", cg->language)); in appleLangDefault()
1362 return (cg->language); in appleLangDefault()
1581 "encoding=%d(%s)", (void *)lang, lang->language, lang->encoding, in cups_cache_lookup()
1584 if (!strcmp(lang->language, name) && in cups_cache_lookup()
1639 lang->strings = appleMessageLoad(lang->language); in cups_message_load()
1648 lang->language, lang->language); in cups_message_load()
1650 if (strchr(lang->language, '_') && access(filename, 0)) in cups_message_load()
1657 lang->language, lang->language); in cups_message_load()