summaryrefslogtreecommitdiff
path: root/src/static/js/html10n.js
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2012-12-20 12:07:37 +0100
committerMarcel Klehr <mklehr@gmx.net>2012-12-23 18:17:21 +0100
commit04b65a0b4ecbb915a6049017347b27c03025ca3c (patch)
tree52e5087e1d42f7b426b1630f19ef88ed416075e7 /src/static/js/html10n.js
parent0c9178d392970012b6c9f87fc8b88fada7eeaab5 (diff)
downloadetherpad-lite-04b65a0b4ecbb915a6049017347b27c03025ca3c.zip
Add support for three-letter lang codes
Diffstat (limited to 'src/static/js/html10n.js')
-rw-r--r--src/static/js/html10n.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/static/js/html10n.js b/src/static/js/html10n.js
index 9769272f..3c4e5450 100644
--- a/src/static/js/html10n.js
+++ b/src/static/js/html10n.js
@@ -122,7 +122,7 @@ window.html10n = (function(window, document, undefined) {
return
}
- if (!data[lang]) lang = lang.substr(0,2)
+ if (!data[lang]) lang = lang.substr(0, lang.indexOf('-') == -1? lang.length : lang.indexOf('-'))
if (!data[lang]) {
cb(new Error('Couldn\'t find translations for '+lang))
return