소스 검색

add systemLang getter for swig template

utsushiiro 7 년 전
부모
커밋
3be553a2fb
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      src/server/util/swigFunctions.js

+ 8 - 0
src/server/util/swigFunctions.js

@@ -49,6 +49,14 @@ module.exports = function(crowi, app, req, locals) {
     return crowi.xss.process(Config.appTitle(config));
   };
 
+  /**
+   * return system language
+   */
+  locals.systemLang = function() {
+    const config = crowi.getConfig();
+    return Config.systemLang(config);
+  };
+
   /**
    * return true if enabled
    */