forked from om/chatcontrol_dk
Detect language based on URL
If the outer website is english/danish, the chatapp will use the same language.
This commit is contained in:
parent
bf2cf81c9d
commit
758367ba69
|
@ -68,7 +68,14 @@ const typing_speed = 50;
|
|||
|
||||
var conversation_count = 0;
|
||||
var current_dialog = null;
|
||||
|
||||
var current_language = "da";
|
||||
if(location.protocol.startsWith('http')) { // avoid X-origin errors
|
||||
if(parent.location.href.match(/\ben\b/)) {
|
||||
current_language = 'en';
|
||||
}
|
||||
} // else: Just stick to danish
|
||||
|
||||
var current_dialog_fn = null;
|
||||
|
||||
/// SVG 1.1 doesn't do proper text splitting into several lines.
|
||||
|
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Loading…
Reference in a new issue