Question to php-settings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hans-Jürgen Lommel

    #1

    Question to php-settings

    Hi, sorry, maybe a stupid question, but anyway

    i have some php-scripts with things like this

    echo <snip> _("Name:") ; <snap>

    it is not possible to see this page in my browser

    when I change this in

    echo <snip> ("Name:") ; <snip>

    the page is loaded.

    I think it's an php-setting, but which ?

    Can anyone help me

    tia
    Hans-Jürgen


  • Oli Filth

    #2
    Re: Question to php-settings

    Hans-Jürgen Lommel said the following on 25/06/2005 15:50:[color=blue]
    > Hi, sorry, maybe a stupid question, but anyway
    >
    > i have some php-scripts with things like this
    >
    > echo <snip> _("Name:") ; <snap>
    >
    > it is not possible to see this page in my browser
    >
    > when I change this in
    >
    > echo <snip> ("Name:") ; <snip>
    >
    > the page is loaded.
    >
    > I think it's an php-setting, but which ?
    >[/color]

    can you post the whole line, rather than snipping it?


    --
    Oli

    Comment

    • Andy Hassall

      #3
      Re: Question to php-settings

      On Sat, 25 Jun 2005 16:50:07 +0200, Hans-Jürgen Lommel
      <hans-juergen@hjlomme l.de> wrote:
      [color=blue]
      >Hi, sorry, maybe a stupid question, but anyway
      >
      >i have some php-scripts with things like this
      >
      >echo <snip> _("Name:") ; <snap>
      >
      >it is not possible to see this page in my browser
      >
      >when I change this in
      >
      >echo <snip> ("Name:") ; <snip>
      >
      >the page is loaded.
      >
      >I think it's an php-setting, but which ?[/color]

      I'd guess: http://uk.php.net/manual/en/function.gettext.php

      --
      Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
      <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

      Comment

      • Hans-Jürgen Lommel

        #4
        Re: Question to php-settings

        Oli Filth wrote:
        [color=blue]
        > Hans-Jürgen Lommel said the following on 25/06/2005 15:50:[color=green]
        >> Hi, sorry, maybe a stupid question, but anyway
        >>
        >> i have some php-scripts with things like this
        >>
        >> echo <snip> _("Name:") ; <snap>
        >>
        >> it is not possible to see this page in my browser
        >>
        >> when I change this in
        >>
        >> echo <snip> ("Name:") ; <snip>
        >>
        >> the page is loaded.
        >>
        >> I think it's an php-setting, but which ?
        >>[/color]
        >
        > can you post the whole line, rather than snipping it?
        >
        >[/color]
        OK here is it, it's a part of login.php and belongs to the
        squirrelmail-package.
        I got the hint that it is a shortform of GetText and I trie a Test-Script
        from the php-manual

        <?php
        // Set language to German
        setlocale(LC_AL L, 'de_DE');

        // Specify location of translation tables
        bindtextdomain( "myPHPApp", "./locale");

        // Choose domain
        textdomain("myP HPApp");

        // Translation is looking for in ./locale/de_DE/LC_MESSAGES/myPHPApp.mo now

        // Print a test message
        echo gettext("Welcom e to My PHP Application");

        // Or use the alias _() for gettext()
        echo _("Have a nice day");
        ?>

        On my Suse-Machine I see the text,
        on my eisfair-Server not.

        Ups, what to do ?

        Comment

        Working...