-
-
Save dineshghule321/20ee920218ae31a8a2acb737cf416b58 to your computer and use it in GitHub Desktop.
Revisions
-
dineshghule321 revised this gist
Feb 20, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ echo _("We connect developers and translators around the globe on Lingohub for a fantastic localization experience."); echo sprintf(_('Welcome back, %1$s! Your last visit was on %2$s', $user, date('l'))); // dgettext() is similar to _(), but it also accepts a domain name if a string from // a domain other the one set by textdomain() needs to be displayed -
Marko Bošković revised this gist
Jul 7, 2013 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,4 +37,8 @@ // dgettext() is similar to _(), but it also accepts a domain name if a string from // a domain other the one set by textdomain() needs to be displayed echo dgettext("example2", ""); // ngettext() is used when the plural form of the message is dependent on the count echo ngettext("%d page read.", "%d pages read.", 1); //outputs a form used for singular echo ngettext("%d page read.", "%d pages read.", 15); //outputs a form used when the count is 15 ?> -
Marko Bošković revised this gist
Jul 7, 2013 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,6 +21,10 @@ textdomain($domain); $domain2 = "example2"; bindtextdomain($domain2, "Locale"); bind_textdomain_codeset($domain2, 'UTF-8'); $user = "Curious gettext tester"; // _() is an alias of gettext() -
Marko Bošković revised this gist
Jul 7, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,8 @@ // _() is an alias of gettext() echo _("Let’s make the web multilingual."); echo _("We connect developers and translators around the globe on Lingohub for a fantastic localization experience."); echo sprintf(_('Welcome back, %1$s! Your last visit was on %2$s', $user, date('l')); -
Marko Bošković revised this gist
Jul 7, 2013 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,13 @@ $user = "Curious gettext tester"; // _() is an alias of gettext() echo _("Let’s make the web multilingual."); echo _("We connect developers and translators around the globe \non Lingohub for a fantastic localization experience."); echo sprintf(_('Welcome back, %1$s! Your last visit was on %2$s', $user, date('l')); // dgettext() is similar to _(), but it also accepts a domain name if a string from // a domain other the one set by textdomain() needs to be displayed echo dgettext("example2", ""); ?> -
Marko Bošković revised this gist
Jul 7, 2013 . 1 changed file with 14 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,18 @@ <?php session_start(); if (isset($_GET["locale"])) { $locale = $_GET["locale"]; } else if (isset($_SESSION["locale"])) { $locale = $_SESSION["locale"]; } else { $locale = "en_UK"; } putenv("LANG=" . $locale); setlocale(LC_ALL, $locale); $domain = "example"; -
Marko Bošković revised this gist
Jul 5, 2013 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,5 +15,4 @@ echo _("Let’s make the web multilingual."); echo _("We connect developers and translators around the globe \non Lingohub for a fantastic localization experience."); echo sprintf(_('Welcome back, %1$s! Your last visit was on %2$s', $user, date('l')); ?> -
Marko Bošković revised this gist
Jul 5, 2013 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,8 +14,6 @@ echo _("Let’s make the web multilingual."); echo _("We connect developers and translators around the globe \non Lingohub for a fantastic localization experience."); echo sprintf(_('Welcome back, %1$s! Your last visit was on %2$s', $user, date('l')); )); ?> -
Marko Bošković revised this gist
Jul 5, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ echo _("Let’s make the web multilingual."); echo _("We connect developers and translators around the globe \non Lingohub for a fantastic localization experience."); echo $this->lang->_trans('Welcome back, %1$s! Your last visit was on %2$s', array( 'u' => $user, 'd' => date('l') )); -
Marko Bošković created this gist
Jul 5, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ <?php $language = "de"; putenv("LANG=" . $language); setlocale(LC_ALL, $language); $domain = "example"; bindtextdomain($domain, "Locale"); bind_textdomain_codeset($domain, 'UTF-8'); textdomain($domain); $user = "Curious gettext tester"; echo _("Let’s make the web multilingual."); echo _("We connect developers and translators around the globe \non Lingohub for a fantastic localization experience."); echo $this->lang->_trans('Welcome back, %u! Your last visit was on %d', array( 'u' => $user, 'd' => date('l') )); ?>