arrays - Use PHP Gettext without having to install locales -
I see alternatives to internationalizing an open source project:
-
Gatetext, which suggests to all, is apparently necessary to use locals to "install on your system" on this PHP manual, which actually reflects my position. It also asks about the same problem, it is not suitable for an open source project because I can not believe that end users have proper locale installed on their system. Apart from this, it is very strange that you only need to install locale to use the stars that you have translated. (IMO).
-
ZdroSlate is also sometimes recommended in favor of Gatetext, but I am not using Zend Framework, so I do not think this is an option for me Some people have said that you can divide it by the Zend Framework, but I will not have any clue about how. If someone can tell me what file I need (I've downloaded a tarball of the Zend Framework), then I would be open to using Zend_Translate.
-
This is what I am doing, but this is not ideal because:
- It's too much memory to define every translation , Most will not be used by the current page. / Li>
- I'm having trouble duplicating the keys in my array, which has already become a code of 1000 lines and I have not added anything yet ...
- This means non-programmers can not actually translate, while the podit standard is expected to use everyone.
Should I somehow use the
.mo files without Gettext or Zend_Translate, or should I use Gatetext? If so, how can I work in all the locals, as I have questioned in the above question?
EDIT: I am ready to use Zend_Translate now. I just need to know what files I need (if they can be added to a file then it would be great) - I do not want full Zend framework in my project.
Update: I was interested in seeing how large open source projects handle ILN:
- Moodle uses.
- To use the drupal they seem to run the
cetocolokel ('c') and the whole
setlocale to get the normal code Do away.
- Use Gettext below, though Wordpress uses for i18n.
So none of those three random projects use Zend_Translate, nor gettext directly, as far as I can see.
Maybe it's a good idea to store the language name in the
C locale, text domain name, and go from there.
So even I got it with:
$ lang = 'de'; // debug sitelokel (lc_ol, 'c'); Bindtextdomain ('default', path. "/ Locale / $ lang"); Bind_textdomain_codeset ('default', 'UTF-8'); Text domains ('default'); Var_dump (file_exists (Pat. "/locale/$lang/C/LC_MESSAGES/default.mo")); // bool (true)
But I still get the English string, even though I did poedit, msgfmt etc. to do the proper files. I have also tried to restart Apache.
Try it for dropdown in gettext written in PHP. It was originally intended for WordPress, I think, because WP needs to run on a shared host, which is not always configured for every location. I like this as your problem too.
It has little effect, but this is not a problem for me.
- Use Gettext below, though Wordpress uses for i18n.
Comments
Post a Comment