how to force utf-8/zh-cn?

Asked by jason

I did it in the old version but forgot where to put it for the latest 1.2.2.1,it always get the .mo from locale sub folder?

Question information

Language:
English Edit question
Status:
Answered
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

You need to adjust your browser preferences. It will use whichever mo
file matches what your browser preferences are set to. There's no way
to force it server side - and never has been.

Alex

Revision history for this message
jason (jtzhou) said :
#2

thank for your reply, I did force the setting and the header will look like
this:
<meta http-equiv="Content-Language" content="zh-cn">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

if not force the setting, the header will look like this:

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

we know UTF-8 can have zh-TW,zh-CN, so which .mo file is used?

--------------------------------------------------
From: "Alex Harrington" <email address hidden>
Sent: Wednesday, March 16, 2011 4:21 PM
To: <email address hidden>
Subject: Re: [Question #149275]: how to force utf-8/zh-cn?

> Your question #149275 on Xibo changed:
> https://answers.launchpad.net/xibo/+question/149275
>
> Status: Open => Answered
>
> Alex Harrington proposed the following answer:
> You need to adjust your browser preferences. It will use whichever mo
> file matches what your browser preferences are set to. There's no way
> to force it server side - and never has been.
>
> Alex
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/xibo/+question/149275/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/xibo/+question/149275
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Alex Harrington (alexharrington) said :
#3

> we know UTF-8 can have zh-TW,zh-CN, so which .mo file is used?

Whichever your browser is set to prefer. Again, there is no way to
force a language in Xibo. The code just doesn't exist. It will look at
the list of languages your browser tells us you prefer, and serve you
the first one we have a translation for.

So if your browser is set to zh-TW then it will use zh-TW.mo and if
it's set to zh-CN then it will use zh-CN.mo

Alex

Revision history for this message
jason (jtzhou) said :
#4

thank for the reply, the browser got both "gb2312","utf-8", but both setting
won't use locale/zh_CN.mo, seems when xibo send out the http header, we can
easily to add one line code to force an encoding to use zh_CN.mo, just
forgot where to put this line....

--------------------------------------------------
From: "Alex Harrington" <email address hidden>
Sent: Wednesday, March 16, 2011 4:21 PM
To: <email address hidden>
Subject: Re: [Question #149275]: how to force utf-8/zh-cn?

> Your question #149275 on Xibo changed:
> https://answers.launchpad.net/xibo/+question/149275
>
> Status: Open => Answered
>
> Alex Harrington proposed the following answer:
> You need to adjust your browser preferences. It will use whichever mo
> file matches what your browser preferences are set to. There's no way
> to force it server side - and never has been.
>
> Alex
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/xibo/+question/149275/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/xibo/+question/149275
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Alex Harrington (alexharrington) said :
#5

You're not understanding what I'm saying. The character encoding is
irrelevant. In your browser preferences, there's a section for the
languages you prefer.

Firefox
http://support.mozilla.com/en-US/kb/Options%20window%20-%20Content%20panel#w_languages

Internet Explorer
http://windows.microsoft.com/en-GB/windows-vista/Change-your-Internet-Explorer-language-settings

Chrome
http://www.google.com/support/chrome/bin/answer.py?hl=en&answer=95416&from=95415&rd=1

If you set those correctly, then the interface will switch to that
language automatically.

Alex

Can you help with this problem?

Provide an answer of your own, or ask jason for more information if necessary.

To post a message you must log in.