Skip to content

Bugfix/language change fix+german localisations #3781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apinf_packages/core/client/language_select/language.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Template.languageSelect.onCreated(function () {
TAPi18n.setLanguage(selectedLanguage);
T9n.setLanguage(selectedLanguage);
}
else{
//Set English by default
Session.setDefault('lang', 'en');
}
});

Template.languageSelect.helpers({
Expand Down Expand Up @@ -55,6 +59,7 @@ Template.languageSelect.helpers({
activeLanguage () {
// Get current language
const activeLanguage = Session.get('lang');
console.log(activeLanguage)

// Get language from the current data context
const languageTag = this.tag;
Expand All @@ -73,7 +78,7 @@ Template.languageSelect.events({
const language = event.target.value;

// Update selected language in Session
Session.update('lang', language);
Session.set('lang', language);

// Update site language with selected language
TAPi18n.setLanguage(language);
Expand Down
Loading