Skip to main content
  • Snap
  • Restricted

snap_getLocale

Description

Get the user's locale setting. You can use this method to localize text in your Snap.

Note that this method is deprecated. We recommend using snap_getPreferences instead, which provides access to the user's locale as well as other preferences.

Parameters

This method does not have any parameters.

Returns

string

The user's locale setting as a language code.

On this page