- function mkwsSetLang() {
- var lang = mkws.getParameterByName("lang") || m_config.lang;
- if (!lang || !mkws.locale_lang[lang]) {
- m_config.lang = ""
- } else {
- m_config.lang = lang;
- }
-
- log("Locale language: " + (m_config.lang ? m_config.lang : "none"));
- return m_config.lang;
- }
-
-
- // 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
- // different languages.
- //
- function M(word) {
- var lang = m_config.lang;
-
- if (!lang || !mkws.locale_lang[lang])
- return word;
-
- return mkws.locale_lang[lang][word] || word;
- }
- mkws.M = M; // so the Handlebars helper can use it
-
-