File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,21 @@ define([
23
23
24
24
var locale = ( locales [ langId ] ? locales [ langId ] : locales [ language ] ) ;
25
25
26
- var __ = function ( text ) {
26
+ function __ ( text ) {
27
27
var index = locale [ text ] ;
28
28
if ( index === undefined )
29
29
return text ;
30
30
return index ;
31
31
} ;
32
32
33
+ function setLanguage ( language ) {
34
+ locale = locales [ language ] ;
35
+ }
36
+
33
37
return {
34
- __ : __ ,
35
- locales : locales ,
36
- locale : locale
38
+ __ : __ ,
39
+ locales : locales ,
40
+ locale : locale ,
41
+ setLanguage : setLanguage
37
42
} ;
38
43
} ) ;
Original file line number Diff line number Diff line change @@ -75,6 +75,9 @@ require([
75
75
if ( apiProject . template . withGenerator == null )
76
76
apiProject . template . withGenerator = true ;
77
77
78
+ if ( apiProject . template . forceLanguage )
79
+ locale . setLanguage ( apiProject . template . forceLanguage ) ;
80
+
78
81
// Setup jQuery Ajax
79
82
$ . ajaxSetup ( apiProject . template . jQueryAjaxSetup ) ;
80
83
You can’t perform that action at this time.
0 commit comments