globalization / localization

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

    globalization / localization

    Hi,

    I'd like to globalize my website.
    I've seen some pre-coded php apps using this kind of code :

    echo __('Hello') ;

    This displays the Hello message in the correct language.
    I can't get how it works and no doc over the web about that !

    Could you please tell me more ?

    Thanks in advance,

    --
    alex


  • Iván Sánchez Ortega

    #2
    Re: globalization / localization

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    alex wrote:
    [color=blue]
    > I've seen some pre-coded php apps using this kind of code :
    >
    > echo __('Hello') ;
    >
    > This displays the Hello message in the correct language.
    > I can't get how it works and no doc over the web about that ![/color]

    There is documentation, you just have to look for it:



    As you'll see there, the _() function is an alias of gettext().

    - --
    - ----------------------------------
    Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

    Enemies of truth: Convictions are more dangerous enemies of truth than lies.
    -- Friedrich Nietzsche [1844 - 1900]
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)

    iD8DBQFDUQS63jc Q2mg3Pc8RAmC4AK CHIbntzSPx+T8Ce RW5H5dKMhgTEgCe Odrl
    qeEYqdd0fgfs7IN FmPjVojU=
    =b1se
    -----END PGP SIGNATURE-----

    Comment

    • alex

      #3
      Re: globalization / localization

      >[color=blue]
      > There is documentation, you just have to look for it:
      >
      > http://php.net/manual/en/function.gettext.php
      >
      > As you'll see there, the _() function is an alias of gettext().
      >[/color]

      In fact, I didn't know it was an alias... thank you !


      Comment

      • alex

        #4
        Re: globalization / localization

        >[color=blue]
        > There is documentation, you just have to look for it:
        >
        > http://php.net/manual/en/function.gettext.php
        >
        > As you'll see there, the _() function is an alias of gettext().
        >[/color]

        err... well... is __(...) the same as _(...) ?

        --
        alex


        Comment

        Working...