diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-11-26 12:41:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-26 12:41:22 +0300 |
commit | 83e72c9d3ad4b9b5cc0fd3aa20f632c0634980bb (patch) | |
tree | 005fd76b20373516059a6e2187426fd04498e41f /src | |
parent | cad1a63ebc1e8eb0a64c807a2bc0b685e6f0ba26 (diff) | |
parent | dc73654bd59249a384ecdb1d7e22497106650cd3 (diff) |
Merge pull request #712 from nextcloud/bugfix/noid/locale
Include locale in the loleaflet lang parameter
Diffstat (limited to 'src')
-rw-r--r-- | src/helpers/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/index.js b/src/helpers/index.js index 177a935b..31cf98b4 100644 --- a/src/helpers/index.js +++ b/src/helpers/index.js @@ -20,11 +20,11 @@ * */ -import { getLanguage } from 'nextcloud-l10n' +import { getLanguage, getLocale } from 'nextcloud-l10n' const languageToBCP47 = () => { // loleaflet expects a BCP47 language tag syntax - return getLanguage() + return (getLanguage() + '-' + getLocale()) .replace(/^([a-z]{2}).*_([A-Z]{2})$/, (match, p1, p2) => p1 + '-' + p2.toLowerCase()) } |