datadoit
|
| Posted: 01/10/2008, 8:02 PM |
|
CCS 3.2.0.4; PHP5; MySQL5
Taking my first stab at translations in CCS. We have an existing
project that we're setting up for internationalization. Went through
the Project Settings and set up the Internationalization features for
English and Spanish. Set encoding to Unicode UTF-8.
Created a test page and inserted a translation. However, when viewing
the page it doesn't show the translation - only the default language.
Using the locale parameter.
Ex: test.php?locale=en
test.php?locale=es
Verified in Project Settings that Query String Parameter of locale can
be used, along with session values for locale and lang. Tried setting a
session value for locale, but still not showing translated version.
Verified on disk that the appropriate translation files are being
published (en.txt, es.txt).
Published the entire project several times over. Still no love.
Totally stumped. What's missing?
|
|
|
 |
wkempees
|
| Posted: 01/11/2008, 3:38 AM |
|
Publishing settings.
Make sure to publish all files, including the text file containing the
translated strings.
(taken from changing an existing project)
Easy test is in IExplorer, tools, setting, language set it to spanish.
restart IE and ccs should respond.
"datadoit" <datadoit@forum.codecharge> schreef in bericht
news:fm6pog$6pg$1@news.codecharge.com...
> CCS 3.2.0.4; PHP5; MySQL5
>
> Taking my first stab at translations in CCS. We have an existing project
> that we're setting up for internationalization. Went through the Project
> Settings and set up the Internationalization features for English and
> Spanish. Set encoding to Unicode UTF-8.
>
> Created a test page and inserted a translation. However, when viewing the
> page it doesn't show the translation - only the default language. Using
> the locale parameter.
>
> Ex: test.php?locale=en
> test.php?locale=es
>
> Verified in Project Settings that Query String Parameter of locale can be
> used, along with session values for locale and lang. Tried setting a
> session value for locale, but still not showing translated version.
> Verified on disk that the appropriate translation files are being
> published (en.txt, es.txt).
>
> Published the entire project several times over. Still no love. Totally
> stumped. What's missing?
|
|
|
 |
datadoit
|
| Posted: 01/11/2008, 6:31 AM |
|
wkempees wrote:
> Publishing settings.
> Make sure to publish all files, including the text file containing the
> translated strings.
> (taken from changing an existing project)
> Easy test is in IExplorer, tools, setting, language set it to spanish.
> restart IE and ccs should respond.
>
-----------------------
Yessir, verified that all files are being published, including the two
relevent en.txt and es.txt files with the translations. Also verified
the ClientI18N.php file is there.
In CCS, I see the translation resources in the default language chosen.
I can even switch the default language in Project Settings -> Locales
and Encoding, and see the appropriate translation within CCS in design mode.
I'm assuming that if there is a string parameter of locale= in the URL,
the language chosen will be displayed. Similar in functionality as
using dynamic styles (style=whatever). Am I wrong?
There's no doubt the translation resources on the page are getting
translated, since I'm seeing the English version when the page is pulled
up. I just can't switch away from that language. Just to fiddle-faddle
around, I renamed the en.txt file to see how it reacts, and sure enough
the page will only display the translation resource names (ie:
res:Name}. So it's definitely getting translated.
BTW, I tried the IE language setting you suggested - no difference.
Irregardless, I'm looking to avoid relying upon client side settings
since most of our clientèle use 'public' computers (libraries, work, etc.).
Does someone out there have a sample of a translated site working in the
manner that I'm thinking (using locale=en URL parameter)?
|
|
|
 |
datadoit
|
| Posted: 01/11/2008, 10:38 AM |
|
Discovered why this wasn't working for us.
In our Common.php file we had some custom code. Under the Initialize
Common Variables section, we adjusted the line manually:
define("SecureURL", "");
to
define("SecureURL", SSL_URL); //from a earlier declaration.
Just below this line in Common.php is where CCS will write out File
Encoding and Locales information. Because this line was manually
edited, CodeCharge would not write the new information from Project
Settings.
Set the line back to the default and now all is well.
FYI.
|
|
|
 |
wkempees
|
| Posted: 01/16/2008, 4:08 PM |
|
GoodJob!
"datadoit" <datadoit@forum.codecharge> schreef in bericht
news:fm8d3k$70m$1@news.codecharge.com...
> Discovered why this wasn't working for us.
>
> In our Common.php file we had some custom code. Under the Initialize
> Common Variables section, we adjusted the line manually:
>
> define("SecureURL", "");
>
> to
>
> define("SecureURL", SSL_URL); //from a earlier declaration.
>
> Just below this line in Common.php is where CCS will write out File
> Encoding and Locales information. Because this line was manually edited,
> CodeCharge would not write the new information from Project Settings.
>
> Set the line back to the default and now all is well.
>
> FYI.
>
|
|
|
 |
|