Lines Matching refs:locale

70 #include <locale.h>
692 _scf_sanitize_locale(char *locale)
694 for (; *locale != '\0'; locale++)
695 if (!isalnum(*locale) && *locale != '_')
696 *locale = '_';
704 * Name isn't short enough to add the locale to.
707 _add_locale_to_name(const char *name, const char *locale)
713 assert(locale != NULL);
714 loc = strdup(locale);
2929 * name and locale are too long to make a property name
2940 const char *locale, const char **elocale)
2952 * If we use the locale from setlocale, we'll look first for it as
2955 * first match. If all of them fail, we'll try the "C" locale.
2958 * described above, but will fall back to "C" locale.
2960 if (locale == NULL) {
2963 loc = strdup(locale = setlocale(LC_MESSAGES, NULL));
2988 * try new locale.
2993 * The trimming char is not on the locale,
3018 *elocale = locale;
3032 scf_tmpl_pg_common_name_loc(const scf_pg_tmpl_t *t, const char *locale,
3037 SCF_PROPERTY_TM_COMMON_NAME_PREFIX, locale, elocale)) == NULL)
3052 * locale is too long to make a valid property name
3062 scf_tmpl_pg_common_name(const scf_pg_tmpl_t *t, const char *locale, char **out)
3064 return (scf_tmpl_pg_common_name_loc(t, locale, out, NULL));
3068 scf_tmpl_pg_description_loc(const scf_pg_tmpl_t *t, const char *locale,
3073 SCF_PROPERTY_TM_DESCRIPTION_PREFIX, locale, elocale)) == NULL)
3089 * locale is too long to make a valid property name
3099 scf_tmpl_pg_description(const scf_pg_tmpl_t *t, const char *locale, char **out)
3101 return (scf_tmpl_pg_description_loc(t, locale, out, NULL));
3359 scf_tmpl_prop_common_name_loc(const scf_prop_tmpl_t *t, const char *locale,
3364 SCF_PROPERTY_TM_COMMON_NAME_PREFIX, locale, elocale)) == NULL)
3383 * locale is too long to make a property name
3389 scf_tmpl_prop_common_name(const scf_prop_tmpl_t *t, const char *locale,
3392 return (scf_tmpl_prop_common_name_loc(t, locale, out, NULL));
3396 scf_tmpl_prop_description_loc(const scf_prop_tmpl_t *t, const char *locale,
3401 SCF_PROPERTY_TM_DESCRIPTION_PREFIX, locale, elocale)) == NULL)
3420 * locale is too long to make a property name
3426 scf_tmpl_prop_description(const scf_prop_tmpl_t *t, const char *locale,
3429 return (scf_tmpl_prop_description_loc(t, locale, out, NULL));
3433 scf_tmpl_prop_units_loc(const scf_prop_tmpl_t *t, const char *locale,
3438 SCF_PROPERTY_TM_UNITS_PREFIX, locale, elocale)) == NULL)
3457 * locale is too long to make a property name
3463 scf_tmpl_prop_units(const scf_prop_tmpl_t *t, const char *locale, char **out)
3465 return (scf_tmpl_prop_units_loc(t, locale, out, NULL));
4314 scf_tmpl_value_common_name_loc(const scf_prop_tmpl_t *t, const char *locale,
4323 *out = _read_localized_astring_from_pg(t->prt_pg, value_name, locale,
4350 * name and locale are too long to make a property name
4361 scf_tmpl_value_common_name(const scf_prop_tmpl_t *t, const char *locale,
4364 return (scf_tmpl_value_common_name_loc(t, locale, value, out, NULL));
4368 scf_tmpl_value_description_loc(const scf_prop_tmpl_t *t, const char *locale,
4378 *out = _read_localized_astring_from_pg(t->prt_pg, value_name, locale,
4405 * name and locale are too long to make a property name
4416 scf_tmpl_value_description(const scf_prop_tmpl_t *t, const char *locale,
4419 return (scf_tmpl_value_description_loc(t, locale, value, out, NULL));