2008-10-15, 10:03 AM
Right, a member on a forum I administrate pointed me to this forum yesterday and suggested a migration. I like what I see so I decided to translate it into Danish seeing as there is no translation listed. I probably won't be translating the admin panel, but the front-end is about 40% complete.
Anyway, I have a few comments regarding the translation system:
I'm quite sure both of them are in use seeing as the index of the former is akismet_newthread and the latter is akismet_newpost. Sometimes there may even be strings which are completely identical across different files.
A solution could be to use something like gettext. Gettext is a standard in regards to translation and you would benefit from using it. PHP has already got an extension for this, but there are also pure-PHP implementations such as the one used in Zend_Translate (in Zend Framework).
The benefits I can think of in using gettext in place of your existing system are:
Implementing this will obviously be a big, and somewhat arduous, task so it's probably something that would have to wait for the next major version should you decide to do this. Nevertheless, I believe you'll benefit from this greatly!
Anyway, although I haven't had much time to examine it, this looks like a really good piece of software.
Anyway, I have a few comments regarding the translation system:
- It's sometimes a bit difficult knowing what things means. Sometimes there might be strings that are just conjunctions or prepositions. These cannot just always be directly translated and that makes it difficult when you're supposed to translate just that word alone, because it might change meaning depending on the context in which it appears.
- There are a lot of duplication going on and that makes it really annoying to translate. You'll get a "wtf I already translated this once" feeling all the time.
- Sometimes sentences are split into multiple strings. This is bad seeing as it'll eliminate languages that doesn't have a syntax that resembles that of the English language.
Quote:Akismet has detected that this is a spam message and will not be processed.<br />If you find this is in [sic] error please contact your forum administrator.and then a few lines below:
Quote:Akismet has detected that this is a spam message and will not be processed.<br />If you find this is in [sic] error please contact your system administrator.(note the error in the original strings, by the way)
I'm quite sure both of them are in use seeing as the index of the former is akismet_newthread and the latter is akismet_newpost. Sometimes there may even be strings which are completely identical across different files.
A solution could be to use something like gettext. Gettext is a standard in regards to translation and you would benefit from using it. PHP has already got an extension for this, but there are also pure-PHP implementations such as the one used in Zend_Translate (in Zend Framework).
The benefits I can think of in using gettext in place of your existing system are:
- You'll eliminate identical strings. This is due to the nature of how gettext works.
- Untranslated items will fall back to the default language, i.e. English is this case.
- Industry standard. People will not have to adapt to a proprietary system.
- It'll be easier to add new translations as well as maintain the translation to ensure that there are no redundant, unused data.
- You can immediately see within the source code what the original string is because that's where it resides.
- Once you've got it implemented it's really easy to use. Need a string translated then just do something like _('Translate this!') (i.e. a function named _) and you're done.
Implementing this will obviously be a big, and somewhat arduous, task so it's probably something that would have to wait for the next major version should you decide to do this. Nevertheless, I believe you'll benefit from this greatly!
Anyway, although I haven't had much time to examine it, this looks like a really good piece of software.