Location: PHPKode > projects > Aukyla Document Management System > update_messages.php
#!/usr/bin/php
<?php

if(isset($_SERVER['argv'][1]) == false ||
   is_dir('locale/') == false)
{
	echo "Usage: ./update_messages.php <module>\n";
	exit(1);
}

$module = $_SERVER['argv'][1];
$xgettext = "xgettext";
$options = "--language=PHP --keyword=i18n --from-code=utf-8";
$languages = array();
exec("cut -d : -f 1 locale/languages | grep -v en", $languages);

$source = "$module/*.php";
exec("$xgettext $options --output=locale/$module/template.pot $source");
foreach($languages as $language)
{
	$po = "locale/$module/$language.po";
	if(file_exists($po))
	{
		exec("$xgettext $options -j --output=$po $source $po");
	}
	else
	{
		exec("$xgettext $options --output=$po $source");
	}
}

?>
Return current item: Aukyla Document Management System