Exemplo n.º 1
0
        public static object setlocale(CodeContext /*!*/ context, int category, [DefaultParameterValue(null)] string locale)
        {
            LocaleInfo li = GetLocaleInfo(context);

            if (locale == null)
            {
                return(li.GetLocale(context, category));
            }

            return(li.SetLocale(context, category, locale));
        }
Exemplo n.º 2
0
        public static object setlocale(CodeContext /*!*/ context, int category, string locale = null)
        {
            LocaleInfo li = GetLocaleInfo(context);

            if (locale == null)
            {
                return(li.GetLocale(context, category));
            }
            //  An empty string specifies the user’s default settings.
            if (locale == "")
            {
                locale = GetDefaultLocale();
            }

            return(li.SetLocale(context, category, locale));
        }