Implementin Greek languge to php website

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

    #1

    Implementin Greek languge to php website

    Hi,

    I have a application which shows the content in two different languages
    English and Russian. It has Languge folder where in it maintains
    seperate language folders named English and Russian. The folders of the
    respective language contains php file with variables defined with
    respective Language entries..

    Next.. I would like to Implement The Greek language. I created one
    folder by name greek and the contents of the variables are now greek
    entries. I translated english entries with babel fish.

    Now the problem is:

    When I selected the Greek option to show in Greek. My Website is
    showing junk and unable to parse the language entries.?

    I would like to know the possible cause and how to correct them?. If
    any tutorial,refere nces regarding Multi language implementation of
    websites with PHP is appreciable.

    Thanks in Advance,
    Sharma chelluri
    Hyderbad, India

  • NC

    #2
    Re: Implementin Greek languge to php website

    sharma wrote:[color=blue]
    >
    > I have a application which shows the content in two different[/color]
    languages[color=blue]
    > English and Russian. It has Languge folder where in it maintains
    > seperate language folders named English and Russian. The folders of[/color]
    the[color=blue]
    > respective language contains php file with variables defined with
    > respective Language entries..
    >
    > Next.. I would like to Implement The Greek language. I created one
    > folder by name greek and the contents of the variables are now greek
    > entries. I translated english entries with babel fish.
    >
    > Now the problem is:
    >
    > When I selected the Greek option to show in Greek. My Website is
    > showing junk and unable to parse the language entries.?[/color]

    Assuming your browser has Greek support (does it?), you probably
    forgot to adjust character set heading. English is usually
    rendered with a header setting like this:

    header('Content-Type: text/html; charset=iso-8859-1');

    Sometimes, 'Latin-1' or 'windows-1252' can be used as well.

    Russian has several character sets, the most common of which
    is Windows-1251:

    header('Content-Type: text/html; charset=windows-1251');

    So if you want to render Greek, you must send an appropriate
    "Content-Type:" header:

    header('Content-Type: text/html; charset=iso-8859-7');

    Cheers,
    NC

    Comment

    • sharma

      #3
      Re: Implementin Greek languge to php website

      Hi NC,

      Thanks first..

      Yeah, you are right. but where can i put this header. My application is
      a template kind of system. Header, footer,mainpage type. Any How i Got
      good idea of what you are saying i will try this and get back to
      you...?


      Mean time any more info please reply...

      Thanks
      Sharma chelluri,
      PHP Programmer,
      Hyderabad,India ..

      Comment

      • NC

        #4
        Re: Implementin Greek languge to php website

        sharma wrote:[color=blue]
        >
        > Yeah, you are right. but where can i put this header.[/color]

        The only rule you need to follow is this: headers must be
        sent before any output. If anything (as much as a single
        carriage return) gets output before the header() call,
        you will get the "Headers already sent" error.
        [color=blue]
        > My application is a template kind of system. Header,
        > footer,mainpage type.[/color]

        Then the header() call should be early in the header file...

        Cheers,
        NC

        Comment

        Working...