Get(SystemLocaleElements)

Returns a JSON object with information about the client system's locale.

Format 

Get ( SystemLocaleElements )

Parameters 

None

Data type returned 

text

Originated in version 

19.1.2

Description 

This function returns information about the system's locale, which is the current locale of the client's operating system. The Misc.Active key indicates whether the active locale for the current user is the system's locale (true) or the file's locale (false). This key corresponds to the Use System Formats setting (see Opening files with different system formats).

The root of the returned JSON object includes an APIVers key, whose value is the version number of the JSON object's structure. If the structure of this JSON object changes in a subsequent release, this number will change.

Notes 

  • In FileMaker WebDirect:
    • This function returns information about the host system's locale, not the system locale of the web browser (the FileMaker WebDirect client).
    • The value of the Misc.Active key is always false, because FileMaker WebDirect always uses the file's locale.

Example 1 

Returns the following JSON object on a system where the operating system language was set to English and the region was set to United States. Misc.Active is true, so the system's locale is the active locale for the current user.

Copy
{
    "APIVers" : 1,
    "Currency"
    {
        "Leading" : true,
        "Symbol" : "$"
    },
    "Date"
    {
        "DMQ"
        {
            "1stDayOfWeek" : 1,
            "DaysOfWeek"
            {
                "AbbrvList"
                [
                    "Sun",
                    "Mon",
                    "Tue",
                    "Wed",
                    "Thu",
                    "Fri",
                    "Sat"
                ],
                "NameList"
                [
                    "Sunday",
                    "Monday",
                    "Tuesday",
                    "Wednesday",
                    "Thursday",
                    "Friday",
                    "Saturday"
                ]
            },
            "Months"
            {
                "AbbrvList"
                [
                    "Jan",
                    "Feb",
                    "Mar",
                    "Apr",
                    "May",
                    "Jun",
                    "Jul",
                    "Aug",
                    "Sep",
                    "Oct",
                    "Nov",
                    "Dec"
                ],
                "NameList"
                [
                    "January",
                    "February",
                    "March",
                    "April",
                    "May",
                    "June",
                    "July",
                    "August",
                    "September",
                    "October",
                    "November",
                    "December"
                ]
            },
            "Quarters"
            {
                "AbbrvList"
                [
                    "Q1",
                    "Q2",
                    "Q3",
                    "Q4"
                ],
                "NameList"
                [
                    "1st Quarter",
                    "2nd Quarter",
                    "3rd Quarter",
                    "4th Quarter"
                ]
            }
        },
        "DateNums"
        {
            "0d" : false,
            "0m" : false,
            "YYyy" : false
        },
        "DateOrderID" : 0,
        "DateOrderName" : "MDY",
        "MDY"
        {
            "ElementArray"
            {
                "NameList"
                [
                    "M$",
                    "D#",
                    "YYYY#",
                    "D$"
                ],
                "SepList"
                [
                    ", ",
                    " ",
                    ", ",
                    ""
                ]
            },
            "MustUseLocalesSep" : false
        },
        "Sep" : "/"
    },
    "LocaleID"
    {
        "IDNum" : 21,
        "IDStr" : "English",
        "ISOLangCode" : "en",
        "LID" : "English",
        "Name" : "English"
    },
    "Misc"
    {
        "Active" : true,
        "Metric" : false
    },
    "Num"
    {
        "1000s" : ",",
        "Decimal" : ".",
        "Lead0" : true
    },
    "Text"
    {
        "SQuotLead" : "“",
        "SQuotTrail" : "”",
        "Sep" : ","
    },
    "Time"
    {
        "12h" : true,
        "HMS"
        {
            "0h" : false,
            "24h" : "",
            "Seconds" : false
        },
        "NightDay"
        {
            "12hSuffix" : true,
            "amStr" : " AM",
            "pmStr" : " PM"
        },
        "Sep" : ":"
    }
}

Example 2 

For the same system as in Example 1, returns 1 (true) to indicate that the current system's locale uses the 12-hour format for the time of day.

Copy
JSONGetElement ( Get ( FileLocaleElements ) ; "Time.12h" )