function mkwsSetLang() {
- var lang = getParameterByName("lang") || m_config.lang;
+ var lang = mkws.getParameterByName("lang") || m_config.lang;
if (!lang || !mkws.locale_lang[lang]) {
m_config.lang = ""
} else {
}
- // This function is taken from a StackOverflow answer
- // http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript/901144#901144
- function getParameterByName(name) {
- name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
- var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
- results = regex.exec(location.search);
- return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
- }
-
-
// Translation function. At present, this is properly a
// global-level function (hence the assignment to mkws.M) but we
// want to make it per-team so different teams can operate in