override useragent's language with data-isso-lang
This commit is contained in:
parent
2e9c21db15
commit
aeb7c35d8f
@ -143,6 +143,11 @@ You can configure the client (the JS part) via `data-` attributes:
|
|||||||
<script src="..." data-isso-css="false"></script>
|
<script src="..." data-isso-css="false"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* data-isso-lang
|
||||||
|
|
||||||
|
Override useragent's preferred language. Currently available: german (de),
|
||||||
|
english (en) and french (fr).
|
||||||
|
|
||||||
* data-isso-reply-to-self
|
* data-isso-reply-to-self
|
||||||
|
|
||||||
Set to `true` when spam guard is configured with `reply-to-self = true`.
|
Set to `true` when spam guard is configured with `reply-to-self = true`.
|
||||||
|
@ -3,6 +3,7 @@ define(function() {
|
|||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
"css": true,
|
"css": true,
|
||||||
|
"lang": (navigator.language || navigator.userLanguage).split("-")[0],
|
||||||
"reply-to-self": false
|
"reply-to-self": false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@ define(["app/i18n/de", "app/i18n/en"], function(de, en) {
|
|||||||
|
|
||||||
plurals["de"] = plurals["en"];
|
plurals["de"] = plurals["en"];
|
||||||
|
|
||||||
// the user's language. you can replace this with your own code
|
// useragent's prefered language (or manually overridden)
|
||||||
var lang = (navigator.language || navigator.userLanguage).split("-")[0];
|
var lang = config.lang;
|
||||||
|
|
||||||
// fall back to English
|
// fall back to English
|
||||||
if (!plurals[lang]) {
|
if (!plurals[lang]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user