From: chanywa Date: Fri, 29 Jul 2016 00:32:35 +0000 (+0900) Subject: modifed descriptions regarding setting language X-Git-Tag: submit/tizen/20160805.024428~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24f8f8cf1f8949c1acb8fe3143cdeea1f7321e42;p=platform%2Fcore%2Fapi%2Fmaps-service.git modifed descriptions regarding setting language Change-Id: I011a6376622f37d23dd23fbf3d497b0467dd6f7a --- diff --git a/include/maps_preference.h b/include/maps_preference.h index 4ab98a1..81c0700 100644 --- a/include/maps_preference.h +++ b/include/maps_preference.h @@ -530,7 +530,12 @@ int maps_preference_set_distance_unit(maps_preference_h preference, * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif * * @param[in] preference The preference handle - * @param[in] language The maps language + * @param[in] language The maps language. + * A language is specified as an ISO 3166 alpha-2 two letter country-code + * followed by ISO 639-1 for the two-letter language code. + * Each language tag is composed of one or more "subtags" separated by hyphens (-). + * Each subtag is composed of basic Latin letters or digits only. + * For example, "ko-KR" for Korean, "en-US" for American English. * @return 0 on success, otherwise a negative error value * @retval #MAPS_ERROR_NONE Successful * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter diff --git a/include/maps_view.h b/include/maps_view.h index eebce37..6de81eb 100644 --- a/include/maps_view.h +++ b/include/maps_view.h @@ -751,10 +751,12 @@ int maps_view_get_public_transit_enabled(const maps_view_h view, bool *enable); * default language as the mother tongue of the country or English. * * @param[in] view The view handle - * @param[in] language The display language in the _ syntax. - * The is the ISO 639-1 format and the is the ISO 3166-1 alpha-2 format. - * ISO 639 is a standardized nomenclature used to classify all known languages. Each language is assigned a two-letter (639-1). - * ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1. + * @param[in] language The display language in the map. + * A language is specified as an ISO 3166 alpha-2 two letter country-code + * followed by ISO 639-1 for the two-letter language code. + * Each language tag is composed of one or more "subtags" separated by hyphens (-). + * Each subtag is composed of basic Latin letters or digits only. + * For example, "ko-KR" for Korean, "en-US" for American English. * @return 0 on success, otherwise a negative error value * @retval #MAPS_ERROR_NONE Successful * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter diff --git a/src/api/maps_view.cpp b/src/api/maps_view.cpp index 968a403..6a8eeb3 100644 --- a/src/api/maps_view.cpp +++ b/src/api/maps_view.cpp @@ -1319,33 +1319,6 @@ EXPORT_API int maps_view_set_language(maps_view_h view, const char *language) if (!maps_condition_check_privilege()) return MAPS_ERROR_PERMISSION_DENIED; - /* Check if language is supported */ - static const char *lngs[] = { - "ara", - "chi", - "cht", - "dut", - "eng", - "ger", - "gle", - "fre", - "ita", - "spa", - "rus", - "pol", - "gre", - "wel" - }; - bool supported = false; - for(unsigned int i = 0; i < (sizeof(lngs) / sizeof(lngs[0])); i ++) { - if (g_strcmp0(language, lngs[i]) == 0) { - supported = true; - break; - } - } - if (!supported) - return MAPS_ERROR_INVALID_PARAMETER; - maps_view_s *v = (maps_view_s *) view; int error = maps_set_string(language, _MAPS_VIEW_LANGUAGE_MAX_LENGTH, &v->language); if (error == MAPS_ERROR_NONE)