Language Problem in PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • everurssantosh
    New Member
    • Mar 2008
    • 3

    Language Problem in PHP

    Hi,

    I am trying to show five different languages in my website. I am not using any other tool to achieve this task. Basically, I have stored the all language values in a language file. While in my pages, I include the language page and call the language varriables. I manage the languge value like english, spanish etc in my session varriable.

    My problem is: There are some spcial characters in languages like italian, german for example : è,á ,ó ,Nº ,ñ etc and these are not shown properly in my browser. It shows like a sqare box which makes the complete sentense not readable and looks ugly. I think we need to install some kind of package in the client browser in order to show these special characters!! but honestly speaking, I have no idea how to solve it.

    Any help in this regard is higly appritiated !!

    Thank you
    Santosh
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    This is infact a HTML problem.
    I believe the problem is the unicode settings of the page?

    Because the letters worked on this page, I sneakily lifted the setting Bytes.com uses.

    Stick this in your <head>
    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    See if that helps.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      This is a charset problem. If you are using special characters, you may want to use the Unicode charsets. Like UTF-8.
      (I would recommend always using that one... the ISO charsets are getting a little out of date.)

      To steal Markus' line:
      [code=php]
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      [/code]

      Comment

      • everurssantosh
        New Member
        • Mar 2008
        • 3

        #4
        thanks for the code... this worked perfectly !!


        Regards,
        Santosh

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          Originally posted by everurssantosh
          thanks for the code... this worked perfectly !!


          Regards,
          Santosh
          No problamo!

          Comment

          Working...