Get(FileLocaleElements)

Returns a JSON object with information about the current file's locale.

Format 

Get ( FileLocaleElements )

Parameters 

None

Data type returned 

text

Originated in version 

19.1.2

Description 

This function returns information about the file's locale, which is the locale of the system the file was created on. The Misc.Active key indicates whether the active locale for the current user is the file's locale (true) or the system'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, the value of the Misc.Active key is always true, because FileMaker WebDirect always uses the file's locale.

Example 1 

Returns the following JSON object for a file created on a system where the operating system language was set to French and the region was set to France. Misc.Active is false, so the system's locale, not the file's locale, is the active locale for the current user.

Copy
{
    "APIVers" : 1,
    "Currency"
    {
        "Leading" : false,
        "Symbol" : "€"
    },
    "Date"
    {
        "DMQ"
        {
            "1stDayOfWeek" : 2,
            "DaysOfWeek"
            {
                "AbbrvList"
                [
                    "dim.",
                    "lun.",
                    "mar.",
                    "mer.",
                    "jeu.",
                    "ven.",
                    "sam."
                ],
                "NameList"
                [
                    "dimanche",
                    "lundi",
                    "mardi",
                    "mercredi",
                    "jeudi",
                    "vendredi",
                    "samedi"
                ]
            },
            "Months"
            {
                "AbbrvList"
                [
                    "janv.",
                    "févr.",
                    "mars",
                    "avr.",
                    "mai",
                    "juin",
                    "juil.",
                    "août",
                    "sept.",
                    "oct.",
                    "nov.",
                    "déc."
                ],
                "NameList"
                [
                    "janvier",
                    "février",
                    "mars",
                    "avril",
                    "mai",
                    "juin",
                    "juillet",
                    "août",
                    "septembre",
                    "octobre",
                    "novembre",
                    "décembre"
                ]
            },
            "Quarters"
            {
                "AbbrvList"
                [
                    "T1",
                    "T2",
                    "T3",
                    "T4"
                ],
                "NameList"
                [
                    "1er trimestre",
                    "2ème trimestre",
                    "3ème trimestre",
                    "4ème trimestre"
                ]
            }
        },
        "DMY"
        {
            "ElementArray"
            {
                "NameList"
                [
                    "D#",
                    "M$",
                    "YYYY#",
                    "D$"
                ],
                "SepList"
                [
                    " ",
                    " ",
                    " ",
                    ""
                ]
            },
            "MustUseLocalesSep" : false
        },
        "DateNums"
        {
            "0d" : true,
            "0m" : true,
            "YYyy" : false
        },
        "DateOrderID" : 1,
        "DateOrderName" : "DMY",
        "Sep" : "/"
    },
    "LocaleID"
    {
        "IDNum" : 24,
        "IDStr" : "French",
        "ISOLangCode" : "fr",
        "LID" : "French",
        "Name" : "Français"
    },
    "Misc"
    {
        "Active" : false,
        "Metric" : true
    },
    "Num"
    {
        "1000s" : " ",
        "Decimal" : ",",
        "Lead0" : true
    },
    "Text"
    {
        "SQuotLead" : """,
        "SQuotTrail" : """,
        "Sep" : ";"
    },
    "Time"
    {
        "12h" : false,
        "HMS"
        {
            "0h" : true,
            "24h" : "",
            "Seconds" : false
        },
        "NightDay"
        {
            "12hSuffix" : true,
            "amStr" : " AM",
            "pmStr" : " PM"
        },
        "Sep" : ":"
    }
}

Example 2 

For the same file as in Example 1, returns 0 (false) to indicate that the current file's locale doesn't use the 12-hour format for the time of day.

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