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