File tree Expand file tree Collapse file tree 2 files changed +1281
-1
lines changed Expand file tree Collapse file tree 2 files changed +1281
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ Template.languageSelect.onCreated(function () {
25
25
TAPi18n . setLanguage ( selectedLanguage ) ;
26
26
T9n . setLanguage ( selectedLanguage ) ;
27
27
}
28
+ else {
29
+ //Set English by default
30
+ Session . setDefault ( 'lang' , 'en' ) ;
31
+ }
28
32
} ) ;
29
33
30
34
Template . languageSelect . helpers ( {
@@ -55,6 +59,7 @@ Template.languageSelect.helpers({
55
59
activeLanguage ( ) {
56
60
// Get current language
57
61
const activeLanguage = Session . get ( 'lang' ) ;
62
+ console . log ( activeLanguage )
58
63
59
64
// Get language from the current data context
60
65
const languageTag = this . tag ;
@@ -73,7 +78,7 @@ Template.languageSelect.events({
73
78
const language = event . target . value ;
74
79
75
80
// Update selected language in Session
76
- Session . update ( 'lang' , language ) ;
81
+ Session . set ( 'lang' , language ) ;
77
82
78
83
// Update site language with selected language
79
84
TAPi18n . setLanguage ( language ) ;
You can’t perform that action at this time.
0 commit comments