Jump to content

Archived

This topic is now archived and is closed to further replies.

sumityadav

Multiple Language Websites

Recommended Posts

Can anyone help me in [b]Creating Multiple Language Websites[/b] or any ideas to do this [b]with PHP[/b]. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]I dont want to create multiple copies of files for different languages, unnecessarily coping files. This should be dynamically managed.[/quote]

Please help...
can contact me at
[a href=\"mailto:sumit.kumar@redalkemi.com\"]sumit.kumar@redalkemi.com[/a]

Share this post


Link to post
Share on other sites
I think it might be difficult to do this without having a file for each page in each language, because as far as the computer knows, they're all different files regardless if it is the same content be in different languages. You can either store all of your content in their own files, or in a database and pull the correct language out.

An alternate solution may be to have one copy of each bit of content in a database and dynamicaly submit it to an online translation service and pull the result back and display it. But as we all know, they don't do the best jobs on translation.

Share this post


Link to post
Share on other sites
What if the content on the page is dynamic. Such as displaying the form results in the chosen language etc. I need a solution to get the translations done on the fly. The way you suggested like fetching the records from the database can be done if the page content remain static but wat approach need to be followed for the Dynamic content.

[!--quoteo(post=372230:date=May 8 2006, 02:18 PM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ May 8 2006, 02:18 PM) [snapback]372230[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I think it might be difficult to do this without having a file for each page in each language, because as far as the computer knows, they're all different files regardless if it is the same content be in different languages. You can either store all of your content in their own files, or in a database and pull the correct language out.

An alternate solution may be to have one copy of each bit of content in a database and dynamicaly submit it to an online translation service and pull the result back and display it. But as we all know, they don't do the best jobs on translation.
[/quote]

Share this post


Link to post
Share on other sites
For dynamic content, the only good way is to have a catalog of translatable words. There isn't going to be an easy fix for this one.

Share this post


Link to post
Share on other sites
You mean to say that i should build a huge dictionary/ directory of words or assign each character with the equivalent character code..??? Then what about the names etc fields
[!--quoteo(post=372275:date=May 8 2006, 08:07 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 8 2006, 08:07 PM) [snapback]372275[/snapback][/div][div class=\'quotemain\'][!--quotec--]
For dynamic content, the only good way is to have a catalog of translatable words. There isn't going to be an easy fix for this one.
[/quote]

Share this post


Link to post
Share on other sites
[!--quoteo(post=373187:date=May 11 2006, 04:26 PM:name=Sumit Kumar)--][div class=\'quotetop\']QUOTE(Sumit Kumar @ May 11 2006, 04:26 PM) [snapback]373187[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You mean to say that i should build a huge dictionary/ directory of words or assign each character with the equivalent character code..??? Then what about the names etc fields
[/quote]

yes, unfortunately.

pages in different language can be handle and create dynamicly. Unfortunately, there is no universial rule of translating between languages. So, this will be done by human.
for example: you wanted to put "Welcome to my site".

first, create a variable called: $bundle['en'], this will hold all language term in English
then assign: $bundle['en']['welcome_site'] = "Welcome to my site."
in another language: $bundle['de']['welcome_site'] = "Hei├čen Sie Willkommen zu meiner Stelle."

When you have all terms set up in $bundle, you can manage a multi-lingual page using something like this:

$lang='de'; // specify the german language

<?php echo $bundle[$lang]['welcome_site']; ?>

you might want to check out one of my internationalization site at: www.hungrycat.org

regards,



Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.