Lines Matching refs:locale
9 #include "src/objects/js-locale.h"
20 #include "src/objects/js-locale-inl.h"
47 // Inserts tags from options into locale string.
74 ? GetBoolOption(isolate, options, option_to_bcp47.name, "locale",
77 *(option_to_bcp47.possible_values), "locale",
91 // Overwrite existing, or insert new key-value to the locale string.
101 Handle<Object> UnicodeKeywordValue(Isolate* isolate, Handle<JSLocale> locale,
103 icu::Locale* icu_locale = locale->icu_locale().raw();
373 // 31. Set locale.[[Locale]] to r.[[locale]].
378 Handle<JSLocale> locale = Handle<JSLocale>::cast(
381 locale->set_icu_locale(*managed_locale);
382 return locale;
400 Handle<JSLocale> locale = Handle<JSLocale>::cast(
403 locale->set_icu_locale(*managed_locale);
404 return locale;
410 Handle<JSLocale> locale) {
411 // ICU has limitation on the length of the locale while addLikelySubtags
413 // on the base locale and merge the extension if needed.
414 icu::Locale source(*(locale->icu_locale().raw()));
436 // Valid but super long locale will fail. Just throw here for now.
445 Handle<JSLocale> locale) {
446 // ICU has limitation on the length of the locale while minimizeSubtags
448 // on the base locale and merge the extension if needed.
449 icu::Locale source(*(locale->icu_locale().raw()));
471 // Valid but super long locale will fail. Just throw here for now.
483 const icu::Locale& locale,
489 locale.getUnicodeKeywordValue<std::string>(unicode_key, status);
498 T::getKeywordValuesForLocale(key, locale, commonly_used, status));
519 Handle<JSLocale> locale) {
520 icu::Locale icu_locale(*(locale->icu_locale().raw()));
530 Handle<JSLocale> locale) {
531 icu::Locale icu_locale(*(locale->icu_locale().raw()));
538 Handle<JSLocale> locale) {
540 // Let locale be loc.[[Locale]].
541 icu::Locale icu_locale(*(locale->icu_locale().raw()));
544 // Assert: locale matches the unicode_locale_id production.
549 // common use in the locale for date and time formatting.
597 Handle<JSLocale> locale) {
600 // Let locale be loc.[[Locale]].
601 icu::Locale icu_locale(*(locale->icu_locale().raw()));
604 // Assert: locale matches the unicode_locale_id production.
609 // use in the locale for formatting numeric values.
627 Handle<JSLocale> locale) {
632 // Let locale be loc.[[Locale]].
633 icu::Locale icu_locale(*(locale->icu_locale().raw()));
636 // If the unicode_language_id production of locale does not contain the
645 // Let locale be loc.[[Locale]].
647 // Assert: locale matches the unicode_locale_id production.
649 // Let region be the substring of locale corresponding to the
667 Handle<JSLocale> locale) {
672 // Let locale be loc.[[Locale]].
674 // Assert: locale matches the unicode_locale_id production.
684 // line in the locale is right-to-left, then
687 (locale->icu_locale().raw())->getName(), &status);
707 Handle<JSLocale> locale) {
712 // Let locale be loc.[[Locale]].
714 // Assert: locale matches the unicode_locale_id production.
721 icu::Calendar::createInstance(*(locale->icu_locale().raw()), status));
728 // the 'first' day, for calendar purposes, in the locale.
754 // for calendar purposes, in the locale.
778 Handle<Object> JSLocale::Language(Isolate* isolate, Handle<JSLocale> locale) {
780 const char* language = locale->icu_locale().raw()->getLanguage();
785 Handle<Object> JSLocale::Script(Isolate* isolate, Handle<JSLocale> locale) {
787 const char* script = locale->icu_locale().raw()->getScript();
792 Handle<Object> JSLocale::Region(Isolate* isolate, Handle<JSLocale> locale) {
794 const char* region = locale->icu_locale().raw()->getCountry();
799 Handle<String> JSLocale::BaseName(Isolate* isolate, Handle<JSLocale> locale) {
801 icu::Locale::createFromName(locale->icu_locale().raw()->getBaseName());
806 Handle<Object> JSLocale::Calendar(Isolate* isolate, Handle<JSLocale> locale) {
807 return UnicodeKeywordValue(isolate, locale, "ca");
810 Handle<Object> JSLocale::CaseFirst(Isolate* isolate, Handle<JSLocale> locale) {
811 return UnicodeKeywordValue(isolate, locale, "kf");
814 Handle<Object> JSLocale::Collation(Isolate* isolate, Handle<JSLocale> locale) {
815 return UnicodeKeywordValue(isolate, locale, "co");
818 Handle<Object> JSLocale::HourCycle(Isolate* isolate, Handle<JSLocale> locale) {
819 return UnicodeKeywordValue(isolate, locale, "hc");
822 Handle<Object> JSLocale::Numeric(Isolate* isolate, Handle<JSLocale> locale) {
824 icu::Locale* icu_locale = locale->icu_locale().raw();
832 Handle<JSLocale> locale) {
833 return UnicodeKeywordValue(isolate, locale, "nu");
836 std::string JSLocale::ToString(Handle<JSLocale> locale) {
837 icu::Locale* icu_locale = locale->icu_locale().raw();
841 Handle<String> JSLocale::ToString(Isolate* isolate, Handle<JSLocale> locale) {
842 std::string locale_str = JSLocale::ToString(locale);