extern "C" jstring Java_libcore_icu_ICU_getDisplayLanguageNative(JNIEnv* env, jclass, jstring targetLocale, jstring locale) { Locale loc = getLocale(env, locale); Locale targetLoc = getLocale(env, targetLocale); UnicodeString str; targetLoc.getDisplayLanguage(loc, str); return env->NewString(str.getBuffer(), str.length()); }
static jstring getDisplayLanguageNative(JNIEnv* env, jclass clazz, jstring targetLocale, jstring locale) { Locale loc = getLocale(env, locale); Locale targetLoc = getLocale(env, targetLocale); UnicodeString str; targetLoc.getDisplayLanguage(loc, str); return env->NewString(str.getBuffer(), str.length()); }
static jstring getDisplayLanguageNative(JNIEnv* env, jclass clazz, jstring targetLocale, jstring locale) { // LOGI("ENTER getDisplayLanguageNative"); Locale loc = getLocale(env, locale); Locale targetLoc = getLocale(env, targetLocale); UnicodeString string; targetLoc.getDisplayLanguage(loc, string); jstring result = getJStringFromUnicodeString(env, string); return result; }