Ejemplo n.º 1
0
/* Get the current locale (short code, e.g. es_ES). */
const char *BLF_lang_get(void)
{
#ifdef WITH_INTERNATIONAL
	const char *locale = LOCALE(ULANGUAGE);
	if (locale[0] == '\0') {
		/* Default locale, we have to find which one we are actually using! */
		locale = bl_locale_get();
	}
	return locale;
#else
	return "";
#endif
}
Ejemplo n.º 2
0
/* Get the current locale (short code, e.g. es_ES). */
const char *BLT_lang_get(void)
{
#ifdef WITH_INTERNATIONAL
	if (BLT_translate()) {
		const char *locale = LOCALE(ULANGUAGE);
		if (locale[0] == '\0') {
			/* Default locale, we have to find which one we are actually using! */
			locale = bl_locale_get();
		}
		return locale;
	}
	return "en_US";  /* Kind of default locale in Blender when no translation enabled. */
#else
	return "";
#endif
}