Strategies for developing a bilingual website?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • will

    Strategies for developing a bilingual website?

    I have a php/mysql site and I am wondering if anyone has suggestions
    about strategies for making it bilingual or resources on how to do
    this. I thought of one way which would be to replace the text with
    calls to a database which has all the text in it. But I would prefer to
    have a single file with phrases and then just be able to translate that
    single file into another language to produce a site in another
    language.
    Any ideas would be appreciated.

  • Angelos

    #2
    Re: Strategies for developing a bilingual website?

    will wrote:[color=blue]
    > I have a php/mysql site and I am wondering if anyone has suggestions
    > about strategies for making it bilingual or resources on how to do
    > this. I thought of one way which would be to replace the text with
    > calls to a database which has all the text in it. But I would prefer to
    > have a single file with phrases and then just be able to translate that
    > single file into another language to produce a site in another
    > language.
    > Any ideas would be appreciated.
    >[/color]
    I am wondering about the same thing... I believe that a database with a
    table that stores all the languages and a table that stores all your
    text in fields associated with your content and the lunguage is the best
    Choice...
    I haven't tried it yet to give you an exact solution/example but
    something like that should work.
    Also it might be a different table for the content an other for the menu
    or you can create categories. So each phrase you add in the database
    will be associated with a Language and A category..

    Comment

    • will

      #3
      Re: Strategies for developing a bilingual website?

      I was also thinking about this. I think you can create a single text
      file called something like allText.txt. On each line you can have a
      sentence, phrase, or word that needs to display on the site. Then in
      your php files for the site you can make calls to read from this text
      (I think php must have ways to read from text files as an alternative
      to reading from a database) file. This might be easier than using a
      database because if you want the site translated into another language
      you just need to translate that one text file. I would be interested in
      knowing whether anyone has comments on this.

      Comment

      • Peter Fox

        #4
        Re: Strategies for developing a bilingual website?

        Following on from will's message. . .[color=blue]
        >I have a php/mysql site and I am wondering if anyone has suggestions
        >about strategies for making it bilingual or resources on how to do
        >this. I thought of one way which would be to replace the text with
        >calls to a database which has all the text in it. But I would prefer to
        >have a single file with phrases and then just be able to translate that
        >single file into another language to produce a site in another
        >language.
        >Any ideas would be appreciated.
        >[/color]
        Some thoughts:
        * If the functionality in all languages is the same then some form of
        lookup is practical. If on the other hand you are developing a
        multi/national/ web site where perhaps you will have different forms for
        different data (eg postal addresses and taxes may be different) then you
        probably want to have mysite.com/en/.... and mysite.com/fr/... pages.

        * There are three phases to 'translation' (1) - The initial page
        design/test and (2) Ongoing maintenance of pages (3) Frequently changes
        messages (offer of the day etc)
        Item (3) looks like a database with built-in maintenance function the
        users can play with.
        Items (1) and (2) I would handle by creating a master version in my home
        language and translate once (rather than add server load at every page
        access to do exactly the same thing over and over again) to clone
        other-language copies....

        ....You'd need a defined development process,
        I'd have texts in my master as eg "~WELCOMEMSG~We lcome to my web site.
        For a French version <a href="../fr/index.htm>click here</a>~" and write
        a macro processor that can (a) extract the texts from all my pages to
        pass to a qualified translator and (b) create final php copies with the
        leading key removed and text substituted with the language of your
        choice. Using this scheme you can thoroughly test albeit with extra key
        words in your text and leave translation to somebody who is good at it.


        --
        PETER FOX Not the same since the poster business went to the wall
        peterfox@eminen t.demon.co.uk.n ot.this.bit.no. html
        2 Tees Close, Witham, Essex.
        Gravity beer in Essex <http://www.eminent.dem on.co.uk>

        Comment

        • Ian B

          #5
          Re: Strategies for developing a bilingual website?

          I have done this in the past (see www.jasww.com or any other jas site -
          they are all really the same site).

          We did it with messages in a database (it's CF, but the principle is
          the same).
          You could use resource files and include the language of choice -
          syncing is a problem here
          You can write the site in English and go and get a translation

          e.g.

          echo translate("Welc ome");

          where translate()...
          returns English immediately if language reqd is English
          looks up translation in file/db and returns it if found
          if translation not found, writes to a log and returns the English

          A couple of things to remember, whichever way you do it:

          The site needs a liquid layout - message strings will vary in length
          Have long messages, eevn if you are sure you can split them up, don't
          do it.
          Trying to create a message (even a paragraph) from bits is
          hazardous. Translating each word in a sentence one by one
          obviouslygives pathetic results. even sentence by sentence gives
          problems.

          Ian

          Comment

          • Jerry Stuckle

            #6
            Re: Strategies for developing a bilingual website?

            will wrote:[color=blue]
            > I was also thinking about this. I think you can create a single text
            > file called something like allText.txt. On each line you can have a
            > sentence, phrase, or word that needs to display on the site. Then in
            > your php files for the site you can make calls to read from this text
            > (I think php must have ways to read from text files as an alternative
            > to reading from a database) file. This might be easier than using a
            > database because if you want the site translated into another language
            > you just need to translate that one text file. I would be interested in
            > knowing whether anyone has comments on this.
            >[/color]

            It may be easier to translate but it will be much harder to code for and
            maintain.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            Working...