modifed descriptions regarding setting language 57/81857/3
authorchanywa <cbible.kim@samsung.com>
Fri, 29 Jul 2016 00:32:35 +0000 (09:32 +0900)
committerchanywa <cbible.kim@samsung.com>
Fri, 29 Jul 2016 06:58:00 +0000 (15:58 +0900)
Change-Id: I011a6376622f37d23dd23fbf3d497b0467dd6f7a

include/maps_preference.h
include/maps_view.h
src/api/maps_view.cpp

index 4ab98a1..81c0700 100644 (file)
@@ -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
index eebce37..6de81eb 100644 (file)
@@ -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 <LANGUAGE>_<COUNTRY CODE> syntax.
- * The <LANGUAGE> is the ISO 639-1 format and the <COUNTRY CODE> 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
index 968a403..6a8eeb3 100644 (file)
@@ -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)