Re: Multi lingual pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

I would like to hook up on this issue a little bit more. I am wondering if anybody is willing to share some good advices regarding how to implement a good (normative) url structure so to say when it comes to multi lingual sites. Let me give you an example.

IBM has many different domains including .se, .de, .com, .es and so on. But, all local domains are redirected to e.g. www.ibm.com/de or www.ibm.com/se and so on. Is this "common practise"? Right now, I am about to restructure my employers site. But, in contrast to for example the IBM site, I would like to bind the content to the corresponding domain - without redirecting the visitor. All english content for example will be under the .com domain, all swedish content will be under .se domain. Hope you see what I mean.

I am not seeking advices about how to implement such a structure (I have done this already). I am more interested in pros and cons with either way. My hope is that the site will be more Google friendly.

Am I making sense? I might also add that I read some articles from W3 org about localization / internationalization, but I couldn't find anything useful so far.

What is your opinion?

regards,

//frank


27 jan 2007 kl. 01.12 skrev Jochem Maas:

Otto Wyss wrote:
Paul Novitski wrote:

I formulated my question in general since I couldn't find an other
message here about supporting multiple languages.

http://www.w3.org/International/articles/

http://www.w3.org/TR/i18n-html-tech-lang/

http://php.net/setlocale

Thanks a lot, these are good points for reading.

1) Switching language downloads a new version of the current page,
generally with the same markup but new text.  Example:
http://partcon.ca/

I'll favor this way especially if several languages have to be provided.

In both cases I store the text in database tables that contain a
language field I can select on to match the user's request.

I wonder if retrieving static texts from the database draws too much
performance. I know from somebody who stores texts in large data arrays
an uses shared memory, yet I haven't figured it out how.

I consider storing static texts as defines and just load a different
definition file when the user switches language. Is this practical?

don't go down the define('LANG_KEY', 'lang string value'); route - defines are comparatively SLOW to create. IF you go down the road of loading in text from 'per lang' files I would suggest using an array as the storage mechanism:

$Lang = array(
	'LANG_KEY' => 'lang string value',
	// .. etc
);

assoc array are much less heavy to create.

also consider that there are, imho, 2 kinds of language specific data:

1. 'static' values - button texts, [error] messages - these are specified during site/application
design.

2. 'dynamic' values - document titles, headers, content - these are specified by the owner/user during
the lifetime of the site/application

for the rest I'll just say 'ditto' to most of what the other list members replied :-)


O. Wyss


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Frank Arensmeier
........................................................................ ........................
Marketing Support & Webmaster

NIKE Hydraulics AB
Box 1107
631 80 Eskilstuna
Sweden

phone +46 - (0)16 16 82 34
fax +46 - (0)16 13 93 16
frank.arensmeier@xxxxxxxxxxxxxxxxx
www.nikehydraulics.se
........................................................................ ........................



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux