コード例 #1
0
ファイル: blf_lang.c プロジェクト: akonneker/blensor
/* 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
}
コード例 #2
0
ファイル: blt_lang.c プロジェクト: wchargin/blender
/* 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
}