I set personal preferrence language to my preferred lanaguage, but the GUI still shows English

Hi,

I tried to use Plone 5,
I set the site language is English, and set personal preferrence language to my preferred lanaguage (Chinese), but the UI still shows English, can anyone tell me what's wrong?

It could be:

  • missing translations and english fallback
  • gui override (cookie was set using language switcher)
  • wrong configuration of language negotation
  • a bug (if confirmed please file it at https://github.com/plone/Products.CMFPlone/issues)
  • (something else?)

Thanks.

I will take a look the instructions

Probably not related, but when I set my language to 'Norwegian', the date/time is shown in Chinese,

I'm operating out of my depth here, but I noticed something that might help you.

You could try one of the other Chinese language codes if that works for you?

language code zh-cn appears to be 0% translated, so I guess you might have been trying to use that?
The alternatives are below:
(from http://stackoverflow.com/questions/36947769/plone-i18n-how-much-from-each-language)

0% - Chinese (China) (zh-cn)
94% - Chinese (Taiwan) (zh-tw)
16% - Chinese (Hongkong) (zh-hk)
73% - Chinese Simplified (zh_CN)

Open question, is there (should there be) any difference between zh-CN & zh_CN? There isn't even a zh-CN directory in plone.app.locales...

The Language in the personal preferences has no effect on the UI and as far as I know it never has. It is currently only an indication so that other people might know which language you speak.
Technically the language machinery could be changed to look at this setting, but currently it has no effect.

I'm +1 on implementing that feature. Refs: https://github.com/plone/Products.CMFPlone/issues/1510

@marr I see you did some Chinese translations, do you know the answer to the my question above? Should we even offer zh-cn?

To my understanding, by convention, plone/app/locales/locales/zh_CN is the folder, zh-cn is the Language-Code. zh-CN is a code name by mistake, no difference from zh_CN. We might have the plone/app/locales/locales/zh folder with X-Is-Fallback-For: zh_TW ... something like that. However, that's not the case for the time being. For @maniachhz to see GUI with Chinese messages, one easy way is to set it as Traditional Chinese (繁體中文).


For Plone 5.0.4, you will see the UI like this:

If you set it as Chinese (中文) without country-specific language variants, very likely it remains showing (fallback) English UI.

Thanks for the ping. Hope this helpful.

@marr,

I mean the language is in the personal perferences, not the site language.

BTW, now i try the Kotti instead of Plone. But you can re-produce the issue via https://www.plone-demo.info

The statistics list from i18ndude is wrong because the headers in some of the po files are wrong. I have created a pull request for plone.app.locales to fix this:


(Note: this is no longer really related to the original question.)

2 Likes

Thanks @mauritsvanrees - that explains things! i18ndude prob shouldn't look at the headers though I guess?

True. I did briefly try to change this, but it's a bit more tricky: you need to convert say pt_BR to pt-br, and there is code for locales and for old-style i18n folders. For those last ones we do still need to check the headers. In a new major release of i18ndude we could rip out the support for i18n folders.