How to generate a .po file?

Posted by tobefound on Stack Overflow See other posts from Stack Overflow or by tobefound
Published on 2010-03-25T09:53:10Z Indexed on 2010/03/25 11:13 UTC
Read the original article Hit count: 203

Filed under:
|
|
|

On Windows using WAMPserver (Apache, MySql, Php) I have the following:

//test.php
if (!defined('LC_MESSAGES'))
define('LC_MESSAGES', 6);

$lang = "sv";
putenv("LANG=$lang");
setlocale(LC_ALL, $lang);

$domain = "messages";
bindtextdomain($domain, "./locale");
textdomain($domain);

echo _("This is a string");

It works fine, i.e. it outputs "This is a string" which means I have gettext correctly setup up.

But HOW in the world do I create a .po-file?

I downloaded POEdit but I can't see how to make this happen with that software.

ANy help is greatly appreciated!

© Stack Overflow or respective owner

Related posts about php

Related posts about gettext