Translate

This is a discussion on "Translate" within the Databases section. This forum, and the thread "Translate are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 22nd, 2007, 13:36
Up'n'Coming Member
Join Date: Jul 2007
Location: England
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Translate

Does anyone know how i can translate a website into a different laungage and have it in a tab. so for eample english = metallicwarfare.com and polish would be metallicwarfare.com/pl/ and would be tabed so when i click polish it would take me to that. there is programes out there but they are crap really. and i heard i can do it through mysql database. if someone knowes the lugnage and tells me then what do i do with it? any quidence please
Reply With Quote

  #2 (permalink)  
Old Aug 22nd, 2007, 14:01
VanessaJW's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Kent, England
Age: 37
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Translate

I don't know about the database side, but in terms of getting the site translated I think the only way to get it done accurately is to have it translated by a proper person/company rather than a program.
Reply With Quote
  #3 (permalink)  
Old Aug 22nd, 2007, 14:02
Up'n'Coming Member
Join Date: Jul 2007
Location: England
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Translate

yea. i know the people who will translate it i just dont know how to apply it
Reply With Quote
  #4 (permalink)  
Old Aug 22nd, 2007, 14:17
VanessaJW's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Kent, England
Age: 37
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Translate

Ah, I see. Could you not just have two separate versions of the site, linked together? I guess there's probably a better way of doing it though.
Reply With Quote
  #5 (permalink)  
Old Aug 22nd, 2007, 14:36
Up'n'Coming Member
Join Date: Jul 2007
Location: England
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Translate

well the site is a game so id have to link all users and so forth together and all the logs and stuff which would take deades lol. So i dont know how to do this though. maybe your right im not sure = why i came here to find out but thanks for trying though. i was looking for some guidence maybe a step by step on how to do it?
Reply With Quote
  #6 (permalink)  
Old Aug 22nd, 2007, 15:49
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: Translate

Hey, MW. You have my MSN ID, don't you. And this is exactly the kind of stuff that I'm good at.

I have extensive knowledge with dynamic language content for websites... Just one example. IM me or you can also send an email....
Reply With Quote
  #7 (permalink)  
Old Aug 22nd, 2007, 21:24
Up'n'Coming Member
Join Date: Jul 2007
Location: England
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Translate

hmm pm me on msn then. I dont want it so its english and like german in one page but when they click the flag or a drop down menu it translates to a lauges
Reply With Quote
  #8 (permalink)  
Old Aug 23rd, 2007, 07:09
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Translate

translators charge quite a lot don't they?
Luckily, if I need anything translated,
my cousin just did 3 language degrees
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #9 (permalink)  
Old Aug 23rd, 2007, 21:17
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: Translate

OK, here's a quick explanation of how I've done it:

Every visitor to the site gets new PHP session. In this session I store a 'lang' variable which defaults to english. Then, for each output string you call a function (ex: "getString('key')") to get the string from the right databank table.
PHP: Select all

echo("<div class=\"head\">".getString('head')."</div>"); 

Then I have a databank with tables for each language ('strings_en', 'strings_de', etc.) or inline files ('strings_en.php', 'strings_de.php', etc). The getString function then looks like so (for the database method):
PHP: Select all

function getString($id_string) {
   
$query=mysql_query("SELECT * FROM strings_".$_SESSION['lang']." WHERE id_string='".$id_string."'");
    
$row=mysql_fetch_object($query);
    return 
$row->text;

Or you could have a file for each language in which the language strings are defined in an array:
PHP: Select all

<?php
$strings
['head']="welcome";
$strings['link']="link";
?>
Then you could include the right file one using the session variable:
PHP: Select all

include("strings_".$_SESSION['lang'].".php"); 

and use the array to display the right string using the array key:
PHP: Select all

echo("<div class=\"head\">".$strings['head']."</div>"); 

Reply With Quote
Reply

Tags
tran

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another banner old html help needed to translate! milly Starting Out 2 Jul 30th, 2007 12:12
Would this translate well into CSS? LostProphet Web Page Design 5 Jul 20th, 2006 12:52


All times are GMT. The time now is 19:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43