![]() |
Working in a second or third language
I am working on a project of my own and would like to add other labgauges to it after I finished with English (Chinese, German, Spanish,....).
What is the most logical way to go about it in yur opinion? Natrually I can copy the entire set of files and replace all the words from inEglish with the words with the other langaues, but there has to be a more professional way to do this. Any ideas? Thansk in advance Logical 1 |
Re: Working in a second or third language
you could use something like babel fish (http://babelfish.yahoo.com/) on your website. but i dont know how you would be able to doit any other way than that
|
Re: Working in a second or third language
I'd google around for PHP localization or PHP internationalization. There's probably some sort of framework for this. Alternatively, you could try to create your own, but that'd be a chunk of work.
|
Maybe I did not explain well
May be I did not explain the problem well.
I have text in english in different pages. Forms for example such as: Name: Date: Company: Blabla: In the corresponding french site they have to be: Nom: Date: Compagne: Blablainfrench: I don't want to copy the file and go line by line replace with the translation. This way every time I have to make an update I have to work it twice. I am trying to find another better more professional solution. Any suggestions? |
Re: Working in a second or third language
A more professional solution? Collaborate with a foreign programmer.
|
Re: Working in a second or third language
Logical1, I know what you're aiming for. I don't know what PHP has to offer, and frankly I'm not interested in finding out, but there's probably a framework that allows you to internationalize or localize your app (terminology varies). For instance, in ASP.NET allows you to define resource strings, which are automatically loaded when the user's locale is set to a specific language. Such a framework might look something like this (though really, I'm just doing a mockup; and forgive me if my PHP isn't quite right, I don't use it anymore):
Your web code might look like: :
:
Like I said, it's just a mockup of what such a framework might look like. You'll have to look around and see what's available. |
| All times are GMT -5. The time now is 4:06 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC