#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    Faroe Island
    Posts
    6
    Rep Power
    0

    Help with gettext in php?


    I have been trying for days now to figure out to get this to work, i have been following multiple tutoials online and none of them seem to work, i have tried these:

    codeforest.net/translate-and-localize-your-web-application-with-php-and-gettext
    mel.melaxis.com/devblog/2005/08/06/localizing-php-web-sites-using-gettext/
    onlamp.com/pub/a/php/2002/06/13/php.html

    Does anyone know where i can find an example/demo of this that is working so i can download it and then understand it by watching a full working code instead of following a tutorial?

    and i have tried phpinfo(); and it says
    GetText Support: enabled
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    I messed around with that first tutorial for a few minutes but I wasn't able to get it to work either.

    I recommend just rolling your own solution, gettext really doesn't do all that much for you.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    Faroe Island
    Posts
    6
    Rep Power
    0
    Originally Posted by E-Oreo
    I messed around with that first tutorial for a few minutes but I wasn't able to get it to work either.

    I recommend just rolling your own solution, gettext really doesn't do all that much for you.
    do you have any ideas on what i could use, i want to be able to let contribures to translate it for me on sites like launchpad.net or poeditor.com
  6. #4
  7. For POny!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    Amsterdam
    Posts
    416
    Rep Power
    115
    Originally Posted by jeggy
    do you have any ideas on what i could use, i want to be able to let contribures to translate it for me on sites like launchpad.net or poeditor.com
    You might want to have a look in popular cms systems like Joomla. They use language files which can be easily altered by dedicated users. Just download Joomla and look at the folder /language

    It works pretty much the same as the tutorial you linked apart from the gettext()

IMN logo majestic logo threadwatch logo seochat tools logo