Re: Multi lingual pages
| From: | Frank Arensmeier | Date: | Fri, 09 Feb 2007 18:21:09 +0000 |
| Subject: | Re: Multi lingual pages | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-248674@lists.php.net to get a copy of this message | ||
9 feb 2007 kl. 15.38 skrev Tim:
Yes, of course. Maintaining such a site without rewriting urls would be a nightmare. When I said that those sites are "redirecting" users, I was thinking about response headers. //frank-----Message d'origine----- De : Frank Arensmeier [mailto:frank.arensmeier@nikehydraulics.se] Envoyé : vendredi 9 février 2007 14:51 À : Robert Cummings Cc : PHP List; Jochem Maas; Otto Wyss Objet : Re: [PHP] Multi lingual pages Thank you Robert. Actually, I am not so sure anymore if my idea of "binding" localized content to domains is the right path to go. After a litte research, I saw that many of the major sites out there are redirecting the user to subfolders.As a question or maybe a comment i'm not sure which yet, but aren't those "major" sites rewriting url's rather then redirecting the pages to different folders?
It seems they are usually using the same "layout" and "design" and the content is essentially the same, so i thought it logical to concluded they are using the same framework, i can't imagine using several copies of the same framework to overcome language issues, which would be the case if they were using seperate directories for languages, IMO. Just a "logical" geuss, please correct me if I am mistaken ;) Regards, TimMaybe this is the right thing to do. What would happen if a page is available in English and e.g. american English or when a certain domain is not available? Right now I am playing with mod_rewrite. Looks promising. //frank 9 feb 2007 kl. 13.23 skrev Robert Cummings:On Fri, 2007-02-09 at 09:03 +0100, Frank Arensmeier wrote:wants to swithAnyone?If you use top level domains like that then if someonebetween languages you won't be able to share session information without employing session propogation tricks. Cheers, Rob.advices regarding//frank 8 feb 2007 kl. 11.24 skrev Frank Arensmeier:Hello. I would like to hook up on this issue a little bit more. I am wondering if anybody is willing to share some goodsay when ithow to implement a good (normative) url structure so to.es and socomes to multi lingual sites. Let me give you an example. IBM has many different domains including .se, .de, .com,www.ibm.com/de oron. But, all local domains are redirected to e.g.Right now, I amwww.ibm.com/se and so on. Is this "common practise"?All englishabout 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.structure (Icontent 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 acons withhave done this already). I am more interested in pros andfind an othereither 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'tcontain amessage here about supporting multiple languages.http://www.w3.org/International/articles/ http://www.w3.org/TR/i18n-html-tech-lang/ http://php.net/setlocaleThanks 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 thatin largelanguage 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 textslanguage. Is thisdata 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 switchesvalue'); route -practical?don't go down the define('LANG_KEY', 'lang stringthe roaddefines are comparatively SLOW to create. IF you go downusing anof loading in text from 'per lang' files I would suggest- these arearray 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, contentother listspecified by the owner/user during the lifetime of the site/application for the rest I'll just say 'ditto' to most of what the| such as-- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | a | powerful, scalable system for accessing system servicesmembers replied :-)O. Wyss-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php| forms, properties, sessions, and caches. InterJinn || also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. |`------------------------------------------------------------'