Christopher
|
| Posted: 07/29/2002, 5:57 AM |
|
I want a list box with tree option : I explain my web site is in treee laguages: english, french, spanish I want a lsuit bow with those tree languages and visitor can by choosing one and clicking on button to access the right website I don't want link to the tree vesrions? could someone help me
my english is not very good
great thanks
|
|
|
 |
Ron
|
| Posted: 07/30/2002, 7:35 AM |
|
Christopher,
what programming language do you use? And do you work with CC or CC Studio?
|
|
|
 |
Ron
|
| Posted: 07/30/2002, 7:35 AM |
|
Christopher,
what programming language do you use? And do you work with CC or CC Studio?
|
|
|
 |
Ron
|
| Posted: 07/30/2002, 7:35 AM |
|
Christopher,
what programming language do you use? And do you work with CC or CC Studio?
|
|
|
 |
Christopher
|
| Posted: 07/31/2002, 7:20 AM |
|
I worh with PHP&CCS
great thanks
|
|
|
 |
Ron
|
| Posted: 08/02/2002, 5:10 AM |
|
Christopher,
it can be done in Template version and requires some manual coding. All captions on the form (FormCaption, field captions), should be defined in curl braces, like {FormCaption}. And all button captions, navigator captions should be defined the same way. Check html code that all desired captions are to be defined as suggested and template variable
Then in Open event of the form you should get the selected language and define all captions. E.g. for English:
global $Tpl;
if (CCGetParam("eng", ""))
{
$Tpl->SetVar ("FormCaption", "Results");
$Tpl->SetVar ("Field1Caption", "Name");
// other captions
$Tpl->SetVar ("insert_button", "Insert");
//other buttons
$Tpl->SetVar ("First_link", "First");
//other navigator captions
}
|
|
|
 |
Christopher
|
| Posted: 08/02/2002, 5:46 AM |
|
Thanks Ron
but I can't access on your explanations I just want A listbox with english,french,spanish and one button named go which allows visitor to access the choosen version, please could you give me the code for PHP I'm new in CCS
great thanks
|
|
|
 |
Ron
|
| Posted: 08/05/2002, 6:35 AM |
|
Christopher,
Well, here is more detailed explanation.
The solution allows you to created one site and assign the language translation on the fly, when user selects the site language. To be able to do it, you should define ALL the captions on the all pages as template variables. E.g. {GridFormCaption}, {SearchButton}, {Prev}, etc.
You can do it in design mode.
Create Search form with one listbox field to allow users to select language. Define custom list of values for it like:
eng;English;fr;French;spa;Spanish
Set Preserve parameters to All.
On the page the user access directly after selecting the language create Page After Initialize event where catch the selected language and store it into custom session var:
if (CCGetFromGET("language", ""))
{
CCSetSession("lang", CCGetFromGET("language", ""));
}
On all the other pages you should create Before Show event for each form in order assign real values to each template variable. Here is sample code:
global $Tpl;
if (CCGetSession("lang") == "eng")
{
$Tpl->SetVar ("FormCaption", "Results");
$Tpl->SetVar ("Field1Caption", "Name");
// other captions
$Tpl->SetVar ("insert_button", "Insert");
//other buttons
$Tpl->SetVar ("First_link", "First");
//other navigator captions
}
if (CCGetSession("fr") == "eng")
{
$Tpl->SetVar ("FormCaption", "Results_in_french");
$Tpl->SetVar ("Field1Caption", "Name_in_French");
// other captions
$Tpl->SetVar ("insert_button", "Insert_in_French ");
//other buttons
$Tpl->SetVar ("First_link", "First_in_French ");
//other navigator captions
}
Hope it helps.
|
|
|
 |
|