4.35 Operating System Interaction
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Operating System Interaction
          • shell/1
          • shell/2
          • getenv/2
          • setenv/2
          • unsetenv/1
          • setlocale/3
          • Windows-specific Operating System Interaction
          • Apple specific Operating System Interaction
            • apple_current_locale_identifier/1
          • Dealing with time and date
          • Controlling the swipl-win.exe console window
    • Packages

4.35.2 Apple specific Operating System Interaction

Non-portable Apple MacOS specific predicates are prefixed woth apple_.

apple_current_locale_identifier(-Identifier)
Unify Identifier with the value for CFLocaleGetIdentifier() of the Apple current locale. The Identifier is an atom that consists of the primary language identifier, e.g., en for english followed by an undercore and an identifier for the Region in the MacOS Language & Region preferences. For example, with the primary language set to “English (UK)'' and the Region to “United Kingdom'' we get en_GB. This relates to the locale identifier en_GB.UTF-8. Unfortunately it is not that simple. For example, we can combine the primary language “English (UK)'' with the Region “Netherlands'' to end up with en_NL which is not a valid MacOS locale.