From 4fcbc787b56815d362349e9bdc7b4cf3cef0d934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefano=20Borz=C3=AC?= Date: Sun, 18 Sep 2016 13:40:43 +0200 Subject: [PATCH 1/3] Updated README.MD added troubleshooting and FAQ Updated README.MD added troubleshooting and FAQ --- README.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8faaeb6..72119d8 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,36 @@ This small program shows the basics of using the GNU Project library gettext for Run this program by executing it from the command line: - $ php gettext-example.php \ No newline at end of file + $ php gettext-example.php + +## Troubleshooting + +- "gettext system **doesn't work**" + +If you just cloned this repository and it doesn't work, you have probably some problems about cache (server cache), so you should restart the server with this command (if you use nginx replace apache2 with nginx): + + + $ sudo service apache2 restart + +## FAQ + +- ** How can I generate the files .PO /.POT/.MO from files PHP?** + +You can use this command to generate the file .pot and from it you can use poedit to generate the file .po and .mo + + $ xgettext --from-code=UTF-8 -o messages.pot *.php + +- ** I already generated a file.po but I added some strings to my file.php and I should update the file.po ** + +You can generate the file .po ever with the follow command: + + $ xgettext --from-code=UTF-8 -o messages.pot *.php + +and you can **merge** the file.pot with your file.po with this command: + + $ msgmerge file.po file.pot + +mgmerge can mess up some translations, so read the final file.po with **poedit**. + +**PAY ATTENTION**: when you create a new file .po open it with poedit and save it to generate the file.mo + From eb180c2022b87eafd5dce33830a8a17b91ccbe4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefano=20Borz=C3=AC?= Date: Sun, 18 Sep 2016 14:10:47 +0200 Subject: [PATCH 2/3] Update README.MD --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 72119d8..735f7ba 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ and you can **merge** the file.pot with your file.po with this command: $ msgmerge file.po file.pot -mgmerge can mess up some translations, so read the final file.po with **poedit**. +msgmerge can mess up some translations, so read the final file.po with **poedit**. **PAY ATTENTION**: when you create a new file .po open it with poedit and save it to generate the file.mo From 6a9d0d65e2c27ffc695ce281d557da437d7a217a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefano=20Borz=C3=AC?= Date: Sun, 18 Sep 2016 14:12:23 +0200 Subject: [PATCH 3/3] Update README.MD --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 735f7ba..715a98e 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,13 @@ If you just cloned this repository and it doesn't work, you have probably some p ## FAQ -- ** How can I generate the files .PO /.POT/.MO from files PHP?** +- **How can I generate the files .PO /.POT/.MO from files PHP?** You can use this command to generate the file .pot and from it you can use poedit to generate the file .po and .mo $ xgettext --from-code=UTF-8 -o messages.pot *.php -- ** I already generated a file.po but I added some strings to my file.php and I should update the file.po ** +- **I already generated a file.po but I added some strings to my file.php and I should update the file.po** You can generate the file .po ever with the follow command: