--- title: "system.vision.getLocale" description: "Returns the current string representing the user's Locale, such as 'en' for English." --- # system.vision.getLocale > Returns the current string representing the user's Locale, such as 'en' for English. :::info Backwards Compatibility This function replaces [system.util.getLocale](versioned_docs/version-8.1/appendix/scripting-functions/system-util/system-util-getLocale.md). Any scripts containing Vision Client scoped functions that were replaced with system.vision syntax will still work to maintain backwards compatibility. ::: This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.vision.getLocale()` ### Parameters Nothing ### Returns **String** - String representing the user's Locale, such as 'en' for English. :::note Locale Format When the locale includes a region, this string uses the legacy underscore form (such as `en_US`) rather than a [BCP-47 language tag](../../../platform/localization-and-languages/locale-formats/locale-formats.md) (such as `en-US`). Replace the underscore with a hyphen if you need to pass the value somewhere that expects a language tag. See [Locale Formats and Language Tags](../../../platform/localization-and-languages/locale-formats/locale-formats.md). ::: ### Scope Vision Client ## Code Examples ```python title="Example #1" # print a test if they are using English locale = system.vision.getLocale() if locale == "en": print "Using English" ```