Skip to content
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

How to set the default language? #5

Closed
tvvocold opened this issue Jun 12, 2015 · 8 comments
Closed

How to set the default language? #5

tvvocold opened this issue Jun 12, 2015 · 8 comments

Comments

@tvvocold
Copy link

I try to set L22 of manifest.webapp to zh_cn and add the translation.json in /locales/zh_cn/, but it seems didn't work.

@tvvocold
Copy link
Author

@wwebfor @wwwredfish

@wwebfor
Copy link
Member

wwebfor commented Jun 13, 2015

In order to set the default language, you need to open this file https://github.com/Laverna/laverna/blob/master/app/scripts/helpers/i18next.js#L29. But why do you need to set the default language when you can change language in the settings page?

@tvvocold
Copy link
Author

@wwebfor

But why do you need to set the default language when you can change language in the settings page?

Because the default setting page is lack of Chinese.(zh_cn) (Check it in https://laverna.cc/index.html#/settings or http://laverna.github.io/static-laverna/#/settings)

In order to set the default language, you need to open this file https://github.com/Laverna/laverna/blob/master/app/scripts/helpers/i18next.js#L29.

The i18next.js is Not exit in https://github.com/Laverna/static-laverna :)

@wwebfor
Copy link
Member

wwebfor commented Jun 13, 2015

You're right. For now, you can switch to another language by opening Developer console and executing:

localStorage.setItem('vimarkable.configs-appLang', JSON.stringify({name: 'appLang', value: 'zh_cn'}));

@tvvocold
Copy link
Author

localStorage.setItem('vimarkable.configs-appLang', JSON.stringify({name: 'appLang', value: 'zh_cn'}));
<undefined

That's what i got in chrome console.
BTW, is there any way to change the lang with js?

@wwebfor
Copy link
Member

wwebfor commented Jun 20, 2015

It didn't take effect because right now zh_cn locale doesn't exist in the static version https://github.com/Laverna/static-laverna/tree/gh-pages/locales

@asalthobaity
Copy link

Please commit the ar locale into the static version.

@wwebfor
Copy link
Member

wwebfor commented Jun 17, 2016

The locales were updated.

@wwebfor wwebfor closed this as completed Jun 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants