diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-07-17 10:08:51 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2018-06-27 13:19:40 +0200 |
commit | bf6bfad76bcf40266f7a7bdc71cbf59e8873abe7 (patch) | |
tree | 321bdc812bcdb406eec85d5405ea7d8b527a307a /core/js/js.js | |
parent | 7d8124ad66d336b99c48936e2a6a84ea4d0fef09 (diff) | |
download | nextcloud-server-bf6bfad76bcf40266f7a7bdc71cbf59e8873abe7.tar.gz nextcloud-server-bf6bfad76bcf40266f7a7bdc71cbf59e8873abe7.zip |
OC.getLocale() now returns Locale and no longer Language
Added OC.getLanguage() to get Language
<html lang=''> still gets language, though according to IETF BCP47 locale should be good.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js index a7dba7981f7..3cd8f306044 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -791,6 +791,15 @@ var OCP = {}, * @return {String} locale string */ getLocale: function() { + return $('html').prop('data-locale'); + }, + + /** + * Returns the user's language + * + * @returns {String} language string + */ + getLanguage: function () { return $('html').prop('lang'); }, |