Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. $locale_lang = $_GET['lang'];
  2. $locale_file = new FileReader("locale/$locale_lang/LC_MESSAGE/messages.mo");
  3. $local_fetch = new gettext_reader($locale_file);
  4.  
  5. function _($text){
  6. global $locale_fetch;
  7. return $locale_fetch->translate($text);
  8. }
  9. ?>
  10.  
  11. <h1><?php echo _("Translate using gettext") ?></h1>
  12.  
  13. <p><?php echo _("This video shows a simple tutorial of how ot translate variables using getter.") ?></p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement