I try to make translate my site with gettext function.
I have reade thins manual: http://pl.php.net/ma...ion.gettext.php
But I have problem.
Languages on my main page changes with sessions, like this:
<?php session_start(); require_once("langman.php"); if(!SelectLanguage($_SESSION["lang"])) die("Error selecting language!"); ?>
Everything Works, but don't work in other scripts. So i tried to translate them with gettext.
In main file of the script I put:
setlocale(LC_ALL, $_SESSION["lang"] ); bindtextdomain("news", "./lang"); textdomain("news");
Exapmle .MO file:
msgid "Football" msgstr "Fussbal"
Path is corect as follow:
I call this by:
And don't work.
Anyoe know what I'm doing wrong?