Internacionalization

P

Paulo

What is the best approach? Using DB wich stores the translation of the
variable used on site for each language?

LANGUAGE_CODE, VARIABLE, TRANSLATION
1,'CustomerWord','Customer'
2,'CustomerWord','Cliente' -> 'BR Portuguese

Thanks
 
O

Old Pedant

Paulo said:
What is the best approach? Using DB wich stores the translation of the
variable used on site for each language?

LANGUAGE_CODE, VARIABLE, TRANSLATION
1,'CustomerWord','Customer'
2,'CustomerWord','Cliente' -> 'BR Portuguese

That will work, but it will be very, very, very slow.

Unless this is for a "toy" site that doesn't get very many hits, it would be
a bad way to go.

You need an all-in-memory solution.
 
A

Anthony Jones

Paulo said:
What is the best approach? Using DB wich stores the translation of the
variable used on site for each language?

LANGUAGE_CODE, VARIABLE, TRANSLATION
1,'CustomerWord','Customer'
2,'CustomerWord','Cliente' -> 'BR Portuguese

Learn ASP.NET which has built-in support for this sort of thing.

However the problem with globalisation is that there is more to it than
translation.

Character encoding is important, make sure everthing on the site is saved as
UTF-8, make sure the each page specifies 65001 as its codepage and make sure
every page sets the reponse CharSet to UTF-8. (These are defaults in
ASP.NET).

Layout needs to be considered especially if this is an application. A small
label in English may be twice as long in German so your form layouts must
take this into account. One way to mitigate this would be to place field
labels above the field input and to use some generous spacing.

Another option worth considering (for the ASP scenario) would be to extract
all logic into javascript files and ASP include files and make extensive use
of CSS. Thereby reducing the HTML to a definition of content. Bearing in
mind that a chunk of HTML can be enclosed in a Function also helps with this
especially for the typical repeated set of TRs. Place this first set of ASP
in a folder indicating its language (e.g. http://yoursite/en/ ). With that
done take that folder and have it translated into an appropriate adjacent
folder.

This approach has the advantage of perfoming better and has the flexibility
to allow different layouts per language.

The down side is that changes to HTML require multiple files to be changed.
However that would be a 'handle turning exercise' and maintains the
flexibility to deal with any layout issues specific to a language.

BTW another tip with this approach is to ensure that along with a common
..css reference the language specific pages reference a css from their
language specific folder and that this link is found after the common
reference in document order. Do this even if you can't think of anything
that would be in the language specific css. A language specific css can
then override the common when necessary.
 
P

Paulo

Old Pedant said:
That will work, but it will be very, very, very slow.

Unless this is for a "toy" site that doesn't get very many hits, it would
be
a bad way to go.

You need an all-in-memory solution.

What is a "all-in-memory solution"? Show me examples please!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top