If I setup default language in fcms.php in getLanguage language it works for all pages but those with gallery works not. Those pages has english translation.
The problem is that you call this function within gallery class.
I.E If I call gallery class from /gallery/index.php I can se website in desired language, because path is correct.
But when hit some page which is in root directory ie. home.php and which also call gallery class those line is setting up wrong path value so all page is in english :/
My temporary solution:
1. Added one param to PhotoGallery class constructor in gallery_class.php:
public function __construct (FCMS_Error $fcmsError, Database $fcmsDatabase, User $fcmsUser, $fcmsImage = null, $lngFilePath=null)
2. In gallery_class.php near line 40 (definition of class constructor )I've changed value of function param from '.././language' to 'language'
3. On each page located within script root directory, which wasn't translated after setting up default language (i.e. home.php, profile.php - those pages calls PhotoGallery class) I've added two parameters at the end:
$gallery = new PhotoGallery($fcmsError, $fcmsDatabase, $fcmsUser,0,'.././language');
Unfortunately this method affects T_ngettext(is it right name? don't remember;)) function which is responsible for getting plural forms from po/mo translation files so replaced them and I use T_ only :P
Yep, but can't guarantee that it will works for everybody. I was exploring Your script to fix my issue, could be something more in code whot I've done. At the beginning I was trying to force the script to use just one desired language tweaking get/setLanguage methods it works, but not for pages mentioned above. After that I've decide to modify gallery.
yhmm.. I see now that no matter language I choose I has only my one language xD
But I don't have international family so it was more important to get one particular language on each page then having possibility to switch between them.