SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 48 of 48
  1. #26
    Worship the Krome kromey's Avatar
    Join Date
    Sep 2006
    Location
    Fairbanks, AK
    Posts
    1,621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @bokehman: My multi-table design was created before I knew as much about databases as I do now. I'd been favoring the multi-column design of late.

    @Dan: I like that design. It makes a lot of sense, especially your point about not needing to completely rebuild the database to add a new locale or language. I'll probably adopt that into my new application.
    PHP questions? RTFM
    MySQL questions? RTFM

  2. #27
    SitePoint Guru LinhGB's Avatar
    Join Date
    Apr 2004
    Location
    Melbourne, Australia
    Posts
    902
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about learning a CMS with good support for i18n rather than reinventing the wheel? I personally recommend eZPublish. Have a look at how they support multiple languages and translations. Even if you don't end up using the system, that's something to learn from.

  3. #28
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I worry about the overhead calling database for each page.

  4. #29
    SitePoint Guru Majglow's Avatar
    Join Date
    Aug 1999
    Location
    B-Town
    Posts
    645
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by janetsmith View Post
    I worry about the overhead calling database for each page.
    That's why you use something like gettext.
    Ohai!

  5. #30
    Always learning viveknarula's Avatar
    Join Date
    Mar 2006
    Location
    INDIA
    Posts
    418
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But how can we put an translator into our CMS or website if that language is already not in our database or what ever we use to store the translated text?
    Is there any free translator script or Cms exits ?

  6. #31
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by viveknarula View Post
    But how can we put an translator into our CMS or website if that language is already not in our database or what ever we use to store the translated text?
    Is there any free translator script or Cms exits ?
    You'll want to hire someone who knows the language to do the translations. Automated translation technology isn't quite there yet.

  7. #32
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,935
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by janetsmith View Post
    I worry about the overhead calling database for each page.
    If the DB and webserver are on the same machine I wouldn't worry. I run quite a few sites with the content pulled from the DB each pageload. I wrote a caching system for one site (2.5 million hits per month) but didn't see any improvement. Also don't forget MySQL runs its own caching; SELECT queries are run and then stored until the table is subjected to an INSERT or UPDATE query at which time the cache is purged. If you are paranoid or work from a remote DB just add caching. On each page load check if the cache is stale with filemtime() and if it is rebuild the page; if not serve the cached version
    Quote Originally Posted by Dan Grossman View Post
    Automated translation technology isn't quite there yet.
    Automated translation technology is helpful in ascertaining the general sense of a document but so far, there is not one translation program on the market that can offer acceptable professional results. Humans (I believe) will always beat machines because they are able to understand a text with all its meaning. Even when machines start to come close they will output standard constructions that just comply with the norms of everyday grammar. Think of Yoda from Star wars; he speaks gramatically and syntatically sound English yet if you were to feed his lines to the "google translator" it would output entire nonsense. A simple experiment for the non believers: Feed it a paragraph of English, convert that paragraph to Spanish and then convert the output back to English and see what a lot of nonsense it produces.

    Here's an example of the "google translator":

    Source text:
    “Size matters not. Look at me. Judge me by my size, do you? Hmm? Hmm. And well you should not. For my ally is the Force, and a powerful ally it is. Life creates it, makes it grow. Its energy surrounds us and binds us. Luminous beings are we, not this crude matter. You must feel the Force around you; here, between you, me, the tree, the rock, everywhere, yes. Even between the land and the ship.”

    Source text into Arabic and back into English:
    "Size matters not. Look at me. I judge my size, is not it? Are they? Are. Also, you should not. My ally is the force, and that it strong ally. It creates life and grow. The energy surrounds us and binds us. Luminous beings, we do not rough this subject. You must feel the Force around you. Here, between you and me and the tree Rock, everywhere, yes."

    Or source text into Japanese and then back into English:
    "Size unless so is, is important. Look at me. Don't you think? judge me, so is with my size? Hmm? Hmm. And health it should, is not. Are powerful ally and the power which are been by because of my ally. As for life the making which raises that, it draws up. The energy you surround us, connect. As for bright existence it is not this vulgar problem of us and is not. Power must be felt around you; Here, between you, my wood, the stone, it is anywhere. Between land and boat. "

    Or source text into Spanish and then back into English:
    "The size matters no. To watch to me. To judge me by my size? Hmm? Hmm. And well you do not have. For my ally it is the force, and a long-range ally that is. The life creates it, marks that grow. Its energy surrounds to us and it ties to us. The luminous beings are we, not this crude matter. You must feel the force around you; here, between you, I, the tree, the rock, throughout, yes. Even between the Earth and the ship."
    Last edited by bokehman; Jan 4, 2007 at 09:05.

  8. #33
    Non-Member
    Join Date
    Apr 2006
    Location
    Scotland
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bokehman View Post
    ôSize matters not.
    Great example

  9. #34
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    1337
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just finished making a bilingual website for a client. the way I did so was to store everything in a mysql database, with text fields for each language, etc. and a language selector button on the site which sets a cookie and auto refreshes the page with a bit of javascript when it is clicked, the variable is then read from the cookie by the PHP script and the correct data is grabbed from the database and put into the template.

  10. #35
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Lithuania, Europe
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why use database when you can simply use .ini's for storing language data?

  11. #36
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    1337
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ReeD View Post
    Why use database when you can simply use .ini's for storing language data?
    yeah, cause storing all your content in an INI configuration file is really practical. wtf are you smoking dude?

  12. #37
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bokehman View Post
    Here's an example of the "google translator":
    And that's probably an example of the "latest and greatest" advances in translation technology. Most of the languages on Google's translator, like your English->Spanish->English translation, just go through Systran's software that lots of companies use.

    The Arabic translation is Google's own innovation. Machine learning based on analyzing large amounts of hand fed translations so the computer can learn to translate, including long-distance word reordering.

    And yet, you can barely call the output any better than Systran's.

    And English to Japanese doesn't quite understand the honorific systems of Japan, often using the wrong form of the words in a sentence. It doesn't understand context, so it can't attach the right honorifics to names.

  13. #38
    Worship the Krome kromey's Avatar
    Join Date
    Sep 2006
    Location
    Fairbanks, AK
    Posts
    1,621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    And English to Japanese doesn't quite understand the honorific systems of Japan, often using the wrong form of the words in a sentence. It doesn't understand context, so it can't attach the right honorifics to names.
    Even languages with simpler honorifics, like French or German where you can choose the more formal and be right 99% of the time, have subtle nuances that can only be gleaned from context; so far, machines are just simply incapable of understanding context and applying the changes required by such. And of course the idioms present in any language give machines heaps of trouble. They're better, now, but just try getting anything out there to correctly translate "Je suis sur mon trente-et-un!" (Literally: "I am on my thirty-one!"; Correct translation: "I am ecstatic!")

    The short is: Hire one or more human being(s) to do your translations for you. Machine translations are decades from being as accurate as manual translation.
    PHP questions? RTFM
    MySQL questions? RTFM

  14. #39
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Lithuania, Europe
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rtfm View Post
    yeah, cause storing all your content in an INI configuration file is really practical. wtf are you smoking dude?
    Not all content obviously, but that which doesn't change. This includes things like messages, form field names, etc. No need to store these in a DB.

  15. #40
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about URL's? I'm doing a bi-lingual site too at the moment.
    Here's the catch. The client want's target is belgium and north-france
    Belgium > native dutch or native french
    French > native french
    The client's highest concern is high google ranking.

    How does google display a site using multiple languages via php?

    I thought about using double domain names? e.g.
    www. domaindutch.be
    www. domainfrench.fr

    It's a 5 page, no text change - site. Should I set up a database for that?

  16. #41
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vknt View Post
    It's a 5 page, no text change - site. Should I set up a database for that?
    Nah, that'd be a waste. Just make 5 static files for each site with the proper language text.

  17. #42
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,935
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vknt View Post
    How about URL's?
    Well there are two ways to do it: Both languages share the same URL (Google will index the default language) or a unique URL for each language (Google will index both languages).

  18. #43
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I'll better take 2 URL's then.

  19. #44
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have designed a few bilingual websites. I don't even bother with databases and php here. I do the translations myself because I speak both English and French. Except for having to design almost double the buttons (i.e. Index is the same in both languages, and a few others) I have always done it in HTML and just write my texts, then cut and paste them into the right places. Depending on the length of the pages, I will either use targets or completely separate files, whichever is most convenient to the eye and the scroll bar in a specific circumstance.

  20. #45
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sellerstock, my issue with static HTML for a bilingual site is having to edit two files whenever you wish to modify the HTML. Although Dreamweaver offers templates, I'm not too comfortable using them, especially when it adds unnecessary comments.

    I think PHP makes HTML editing way easier, because you can use the same file for both languages.

    You say lazy, I say convenient

    Google ranking is an interesting issue, which I haven't considered. In the past, I used a GET variable to indicate the language of the page, and every link on the page will have that GET variable appended to it with the right language value (e.g. index.php?lang=ar). There is also a language button that goes to the page matching the current one, but in the other language and, therefore, with the other value of the GET variable.

    Would this be considered search engine-friendly implementation?

  21. #46
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,935
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sellerstock View Post
    Except for having to design almost double the buttons
    If you just overlaided the text on the button you wouldn't have that trouble. All that is needed is two background images that slide together, no text.
    Quote Originally Posted by Naseej-Designer View Post
    Would this be considered search engine-friendly implementation?
    Google is getting pretty clever lately and whether a query string is followed now depends on the naming of the variables. For example Gooogle will follow ?language=en but not ?id=5.

  22. #47
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bokehman View Post
    but not ?id=5.
    Google indexes millions of URLs with "id=".

  23. #48
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,935
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    Google indexes millions of URLs with "id=".
    You might be right but I'm quoting the Google FAQ.

    answer=35156: "What are URLs not followed: Don't use &ID= as a parameter in your URLs."

    Also answer=35769: "Design and content guidelines: If you decide to use dynamic pages (i.e., the URL contains a "?" character), be aware that not every search engine spider crawls dynamic pages".


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •