You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
question about the decisions made in the repository
Issue description
Current behavior:
Hi I'm using ngx-admin for my company webpage, the original default language was English but I've changed to Japanese.
And we provide 2 available languages: English & Japanese only.
However everytime when I access to the webpage: only the main page (right-side) shows Japanese, the left-side menu keeps showing English and I need to choose "Japanese" from the language pulldown-box so that left-side menu will change to Japanese accordingly.
Expected behavior:
I hope the left-side menu will also show Japanese which is our default language, and we don't need to do anything to the language pulldown-box every time.
Steps to reproduce:
I've changed the content of "main.5ea245ffa0935998.js" but I think futher changes are needed.
Could anyone give advice on how to make the changes?
Related code:
main.5ea245ffa0935998.js
var Fe = f(64205),
ft = f(42466);
let Ze = (() => {
class p {
constructor(o, h, M) {
this.analytics = o, this.seoService = h, this.translate = M, M.addLangs(
["Japanese","English"]), M.setDefaultLang("Japanese");
const x = M.getBrowserLang();
M.use(x.match(/English|Japanese/) ? x : "Japanese")
}
ngOnInit() {
this.analytics.trackPageViews(), this.seoService.trackCanonicalChanges()
}
}
return p.\u0275fac = function(o) {
return new(o || p)(_.Y36(z), _.Y36(rt), _.Y36(ft.sK))
}, p.\u0275cmp = _.Xpm({
type: p,
selectors: [
["ngx-app"]
],
decls: 1,
vars: 0,
template: function(o, h) {
1 & o && _._UZ(0, "router-outlet")
},
directives: [w.lC],
encapsulation: 2
}), p
})();
Other information:
It is appreciated that anyone could share how and where (or which file) to change the default language of the left-side menu.
The text was updated successfully, but these errors were encountered:
main.5ea245ffa0935998.js is a bundle. Don't try to analyze this file for this question.
Answering to your question, you could use any translation library, which will load needed translation by select change.
On current project, we're using transloco. Here small preview with menu translation.
And here is how lang change is happening. We're using windows.location.reload cause not all theme components change their content according to language change.
Issue type
I'm submitting a ... (check one with "x")
Issue description
Current behavior:
Hi I'm using ngx-admin for my company webpage, the original default language was English but I've changed to Japanese.
And we provide 2 available languages: English & Japanese only.
However everytime when I access to the webpage: only the main page (right-side) shows Japanese, the left-side menu keeps showing English and I need to choose "Japanese" from the language pulldown-box so that left-side menu will change to Japanese accordingly.
Expected behavior:
I hope the left-side menu will also show Japanese which is our default language, and we don't need to do anything to the language pulldown-box every time.
Steps to reproduce:
I've changed the content of "main.5ea245ffa0935998.js" but I think futher changes are needed.
Could anyone give advice on how to make the changes?
Related code:
main.5ea245ffa0935998.js
Other information:
It is appreciated that anyone could share how and where (or which file) to change the default language of the left-side menu.
The text was updated successfully, but these errors were encountered: