Locked Posted December 17, 2009 Share Posted December 17, 2009 For a few days now iv been trying to use gettext to translate strings but im doing somthing wrong. I used Poedit to make the files. MO File: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: French X-Poedit-Country: FRANCE X-Poedit-SourceCharset: utf-8 X-Poedit-Basepath: C:\Users\Arek\Desktop\xampp\htdocs\ X-Poedit-SearchPath-0: . Another! Php code: $language = 'fr'; putenv("LANG=$language"); setlocale(LC_ALL, $language); $domain = 'messages'; bindtextdomain($domain, '/htdocs/languages/locale'); textdomain($domain); echo gettext("OMG"); Folders: C:\Users\Arek\Desktop\xampp\htdocs\languages\locale\fr\LC_MESSAGES\messages.po Also the php page is called from \htdocs\class\ would that matter? Link to comment https://forums.phpfreaks.com/topic/185480-gettext/ Share on other sites More sharing options...
Locked Posted December 17, 2009 Author Share Posted December 17, 2009 Oh and the dll is loaded too Link to comment https://forums.phpfreaks.com/topic/185480-gettext/#findComment-979477 Share on other sites More sharing options...
Locked Posted December 21, 2009 Author Share Posted December 21, 2009 Bump? xD Link to comment https://forums.phpfreaks.com/topic/185480-gettext/#findComment-981669 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.