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 i18n work? #2104

Closed
chunnallu opened this Issue Jul 11, 2017 · 9 comments

Comments

Projects
None yet
3 participants
@chunnallu
Copy link

chunnallu commented Jul 11, 2017

i want to see the dashboard showing in Chinese when i run :

gulp serve
// or gulp serve:prod

I have looked through the build\i18n.js,but can,t find the answer.
what should i do ?

thanks!

@maciaszczykm maciaszczykm self-assigned this Jul 11, 2017

@maciaszczykm

This comment has been minimized.

Copy link
Member

maciaszczykm commented Jul 11, 2017

Just change yor browser main language to Chinese:

image

You will be able to see translations:

image

@maciaszczykm

This comment has been minimized.

Copy link
Member

maciaszczykm commented Jul 11, 2017

Will you be able to help us with providing more Chinese translations? We track it from #2077. I am working on translation guide in #2103. Your help would be appreciated very much!

@kaasia

This comment has been minimized.

Copy link

kaasia commented Jul 11, 2017

it not work anyway
i use this
export LANG="zh_CN.UTF-8"
change my system language
then i run
"gulp serve"
i access url http://ip:9090
it still display English

@maciaszczykm

This comment has been minimized.

Copy link
Member

maciaszczykm commented Jul 11, 2017

Which browser do you use?

@maciaszczykm maciaszczykm reopened this Jul 11, 2017

@kaasia

This comment has been minimized.

Copy link

kaasia commented Jul 11, 2017

i use IE , not local access , use external style

@maciaszczykm

This comment has been minimized.

Copy link
Member

maciaszczykm commented Jul 11, 2017

Please follow this tutorial: https://www.youtube.com/watch?v=XpoFlwJ_y9s

@chunnallu

This comment has been minimized.

Copy link

chunnallu commented Jul 11, 2017

thanks very much! @maciaszczykm

Will you be able to help us with providing more Chinese translations? We track it from #2077. I am working on translation guide in #2103. Your help would be appreciated very much!

my pleasure ! I'd like have a try ! you do a great job !

@kaasia

This comment has been minimized.

Copy link

kaasia commented Jul 12, 2017

@maciaszczykm,
my outsite ie is using Chinese, but still not work
@chunnallu do you know how to display Chinese

@maciaszczykm maciaszczykm reopened this Jul 12, 2017

@chunnallu

This comment has been minimized.

Copy link

chunnallu commented Jul 12, 2017

I have solve the problem in my project !

  1. if you are using an older version of dashboard , open the build/i18n.js, search
  if (fileExists(translationBundle)){
    command = `${command} --translations_file ${translationBundle}`;
  }

the code fileExists(translationBundle) can't not work in my ubuntu although the translationBundle
path exist ! It would cause your i18n folder be overrideed everytime you run gulp serve:prod , by the default english version.

you can quick fix it by replace by :

 if (fileExists.sync(translationBundle)){
    command = `${command} --translations_file ${translationBundle}`;
  }

or update to last version

  1. if you are run with gulp serve , you should run with gulp serve:prod instead!

@kaasia

@chunnallu chunnallu closed this Jul 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment