Localization/Translations
Posted: Sat Jun 30, 2007 6:56 am
Hey,
For a while now I've been wanting to support localizations/translations within my framework - but I just can't decide on the best way of doing it! The frameworks use is the backend of an open-source CMS I'm developing if that's any relevance. Anyway, here are the ways I can think of for localization:
Gettext
Advantages:
Advantages:
Advantages:
For a while now I've been wanting to support localizations/translations within my framework - but I just can't decide on the best way of doing it! The frameworks use is the backend of an open-source CMS I'm developing if that's any relevance. Anyway, here are the ways I can think of for localization:
Gettext
Advantages:
- There are many web based (Launchpad for example) tools out there to help with translating the .po files (also a lot of applications as well)
- It's the fastest way (after looking at some benchmarking) to provide localization
- Requires the server to have the correct Locales installed
- Requires PHP to be compiled with gettext support
- Have to re-generate .mo files once you have edited the .po files - and if people want to just tweak a string and they don't have the tools to create the .mo it could be tricky
Advantages:
- Again many web-based and applications to help translate .po files
- Doesn't require the server to have Locales installed
- No need for PHP gettext extension
- Quite slow
- Again, have to re-generate .mo files
Advantages:
- Simple to use
- No need to convert to another file type, just edit it and off you go!
- Fast
- No web-based or application to help translations