sumityadav Posted May 8, 2006 Share Posted May 8, 2006 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] Quote Link to comment Share on other sites More sharing options...
zq29 Posted May 8, 2006 Share Posted May 8, 2006 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 Link to comment Share on other sites More sharing options...
sumityadav Posted May 8, 2006 Author Share Posted May 8, 2006 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] Quote Link to comment Share on other sites More sharing options...
ober Posted May 8, 2006 Share Posted May 8, 2006 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 Link to comment Share on other sites More sharing options...
sumityadav Posted May 11, 2006 Author Share Posted May 11, 2006 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] Quote Link to comment Share on other sites More sharing options...
hvle Posted May 11, 2006 Share Posted May 11, 2006 [!--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 Englishthen 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.orgregards, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.