getLocale method

Future<Locale> getLocale()

Returns the locale for the user.

If the user has no language preference set (which is the default setting) or this resource is accessed anonymous, the browser locale detected by Jira is returned. Jira detects the browser locale using the Accept-Language header in the request. However, if this doesn't match a locale available Jira, the site default locale is returned.

This operation can be accessed anonymously.

Permissions required: None.

Implementation

Future<Locale> getLocale() async {
  return Locale.fromJson(await _client.send(
    'get',
    'rest/api/3/mypreferences/locale',
  ));
}