CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> IDE/GUI

 Multilanguage Site

Print topic Send  topic

Author Message
optron


Posts: 114
Posted: 09/22/2006, 11:35 AM

I need to program dynamic content multi language site. Can someone please advise me with the concept. I understand databases pretty well, and I know I would need to keep the information presented in a database, but my concern is how do I need to design the tables in order to keep multiple languages versions ?

Also, is there a component that will allow to switch from one language to another on the fly (without the need to go back to the home page) ?
Are there any examples anywhere ?


Arthur

_________________
==============================
don't forget to check: www.youngliving.us
use: 739947 to register
View profile  Send private message
peterr


Posts: 5971
Posted: 09/24/2006, 3:35 PM

Quote :
how do I need to design the tables in order to keep multiple languages versions
Add "locale_id" or "language_code" or similar field to every table where you want to store localized content.

Quote :
Also, is there a component that will allow to switch from one language to another on the fly
This is pretty well documented in the Help file and CCS even includes the option "Use Internationalization Features" - which allows users to switch the generatated application's locales during run-time. At least this will control the static HTML content stored in the resource/translation files. Then you can also use the WHERE paremeters to retrieve database records "WHERE language_code = " the session variable configured in Project Settings -> Locales & Encodings -> Advanced.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
optron


Posts: 114
Posted: 10/27/2006, 4:36 PM

Peterr - you didn't get my question.
I was asking how do you design the database. Another words what it most optimal ?
I know there are multiple solutions:

- create separate tables for each language (and store them in separate folders)
then select path/table upon language selection

- create single table with multiple columns (each column for separate language)
ITEM_en | ITEM_de | ITEM_pl

- create single table then keep multiple entiers for diferent languages (i.e.
EN | This is a cabinet
DE | Das ist der shrank
PL | To jest szafa
then select records based on first column


what you think ?
Arthur

_________________
==============================
don't forget to check: www.youngliving.us
use: 739947 to register
View profile  Send private message
peterr


Posts: 5971
Posted: 10/27/2006, 5:31 PM

I think that I got your question 100% :-) And my answer matches your last solution:
"Add "locale_id" or "language_code" or similar field to every table where you want to store localized content." = "create single table then keep multiple entiers for diferent languages".
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Arthur
Posted: 11/05/2006, 9:35 PM

Peterr, can you point me please to some place in CSS where I cann see how to select / set Locale Variable, or it has to be done by handcoding ? I've seen a note in help about some example, but I con't find it anywhere in sample applications.

Artuhr
peterr


Posts: 5971
Posted: 11/05/2006, 9:56 PM

See:
http://docs.codecharge.com/studio3/html/UserGuide/Worki...nalization.html
Basically it says that this is automatic and users' Web browsers will select the right language. You can override this default by creating a listbox that invokes a URL with parameters that switch the locale.
<select name="locale">
<option value="" selected>Language</option>
<OPTION VALUE="en" SELECTED>English</OPTION>
<OPTION VALUE="fr">French</OPTION>

Or you can programmatically change the session variable. Or you can programmatically change the language/locale cookie.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Arthur
Posted: 11/06/2006, 11:34 PM

I have red this chapter twice, and I think I understand the idea and possible choices. My only choice (because of location reason) to let the user select the language, then I would like to store the selected language in a database, so it is not assigned to any particular computer or browaser but rather particular user. For that reson I need to create a form with language selection.

Here is what I understand need to be done:

Create a form then I place a listbox with available 4 languages (which are selected from LANGUAGES table). The table cound i.e. consists of 3 fields:

LanguageID - numeric(2)
LangugaeName - string(20)
LanguageLocale - string(2)

underneeth the listbox I place a CHANGE button. Then I use Events:
Server.BeforeShow to declare LANGUAGE variable (not sure if this is necesarry)
Server.OnClick to assign Control.Value to LANGUAGE variable

am I going to the right direction with this concept ?
Arthur

Rene S
Posted: 11/10/2006, 6:43 AM

Hi,

You are suggesting that every user has a login? Because if you want to store the selected language in a database then you will need to know to what user the selected language belongs to. If you want to make it "computer/browser independend" you need to make every user login and lookup which language they choose the first time...

I think...

Rene

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.