Lines Matching refs:locale

48 	int		debug;		/* special debug locale		*/
49 const char* locale; /* message catalog locale */
126 * find catalog in locale and return catopen() descriptor
130 find(const char* locale, const char* catalog)
136 if (!mcfind(locale, catalog, LC_MESSAGES, 0, path, sizeof(path)) || (d = catopen(path, NL_CAT_LOCALE)) == NOCAT)
138 if (locale == (const char*)lc_categories[AST_LC_MESSAGES].prev)
142 ast.locale.set |= AST_LC_internal;
143 setlocale(LC_MESSAGES, locale);
149 ast.locale.set &= ~AST_LC_internal;
156 * initialize the catalog s by loading in the default locale messages
186 * locate the default locale catalog
192 * load the default locale messages
227 * return the C locale message pointer for msg in cat
272 * loc the LC_MESSAGES locale name
283 * The first time translate() is called (for a non-C locale)
362 * adjust for the current locale
366 sfprintf(sfstderr, "AHA#%d:%s cp->locale `%s' %p loc `%s' %p\n", __LINE__, __FILE__, cp->locale, cp->locale, loc, loc);
373 if (cp->locale != loc || cp->nlspath != nlspath)
375 cp->locale = loc;
379 if ((cp->cat = find(cp->locale, cp->name)) == NOCAT)
380 cp->debug = streq(cp->locale, "debug");
395 else if (ast.locale.set & AST_LC_debug)
415 sfprintf(sfstderr, "locale %s catalog %s message %d.%d \"%s\" does not match \"%s\"\n", cp->locale, cp->name, mp->set, mp->seq, r, msg);
419 if (ast.locale.set & AST_LC_debug)
426 if (ast.locale.set & AST_LC_translate)
427 sfprintf(sfstderr, "translate locale=%s catalog=%s set=%d seq=%d \"%s\" => \"%s\"\n", cp->locale, cp->name, mp->set, mp->seq, msg, r == (char*)msg ? "NOPE" : r);