I did a search and didn't find anything recent relating to the phpBB translation process.
As a mod author, I find the translation system really grating:
- I have to keep track of constants across multiple files.
- As translations go out of date, the templates fall back to showing constants rather than the English equivalent.
- There are no good third-party tools for the phpBB translation system; why should translators have to learn PHP array syntax (however simple it may be?)
Not sure if Symfony will provide an in-built translation system, but I'd like to voice my support for the (pretty much industry-standard) gettext.
- As a developer, simply __('enclosing my strings like this') is easy and painless.
- For translators, they can use a multitude of tools to help them with the translation, including online tools like launchpad.net.
- When translated strings are missing, the original string is shown.
- The distribution and activation of language packs / files is effectively the same as it is now
I'd love to see this change.
J
Translations -- use GNU GetText please
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Re: Translations -- use GNU GetText please
I am working with gettext in another project which is currently in early stages of development.
Gettext has many features, no doubt due to its maturity and wide user base. One feature in particular that most "roll my own" internationalization frameworks do not offer is proper support for inflections. There are facilities for specifying the number of inflection forms each language supports, the formula for figuring out which form should be used given a number/quantity, all in a concise format.
I cannot yet endorse gettext entirely simply because I have not used it enough, but I agree that it is a good option to consider.
In terms of practically using it I would be most concerned with its penetration among hosting providers. Since somewhere between many and most phpbb users do not administer their servers relying on an extension which is not widely available probably will not be acceptable.
How about this note from http://www.php.net/manual/en/gettext.requirements.php:
Php's execution model once again demonstrates a poor fit with large projects.
Gettext has many features, no doubt due to its maturity and wide user base. One feature in particular that most "roll my own" internationalization frameworks do not offer is proper support for inflections. There are facilities for specifying the number of inflection forms each language supports, the formula for figuring out which form should be used given a number/quantity, all in a concise format.
I cannot yet endorse gettext entirely simply because I have not used it enough, but I agree that it is a good option to consider.
In terms of practically using it I would be most concerned with its penetration among hosting providers. Since somewhere between many and most phpbb users do not administer their servers relying on an extension which is not widely available probably will not be acceptable.
How about this note from http://www.php.net/manual/en/gettext.requirements.php:
Or user notes on http://www.php.net/manual/en/ref.gettext.php.The GNU gettext library works on a per-process, not per-thread basis. This means that in a multi-user setting such as the Apache web server it will only work with a prefork MPM (i.e. one process per user). Worker and other threaded MPMs will not work.
Php's execution model once again demonstrates a poor fit with large projects.
Re: Translations -- use GNU GetText please
there are php classes/libraries you can use for gettext if gettext isn't compiled into PHP itself. I think that's how WordPress does it.
Re: Translations -- use GNU GetText please
String looks promising, we'd like to test it soon for managing the Hebrew language pack. Any other translators here want to give it a try?
We do need to remember l10n is more than strings - Think calendars, RTL, typography, graphics etc.
But maybe String can do the job... at least for strings.
We do need to remember l10n is more than strings - Think calendars, RTL, typography, graphics etc.
But maybe String can do the job... at least for strings.
Check out the Hebrew edition of phpBB
Re: Translations -- use GNU GetText please
symfony already use gettext
Re: Translations -- use GNU GetText please
Yes! Please, use gettext! it is amazingly useful and working with it is a breeze!
You can actually setup the translation process over web as well as offline!
I'm sorry but the translation process is a pain right now. especially making changes to lang files as new versions come out...
And it works even better than just keeping strings in an array in a .php file
Re: Translations -- use GNU GetText please
+1 for this proposal!!!
As a MOD translator (ea. Anti-SPAM ACP, Download MOD [from phpBB2.x onward from time to time]) I find that phpBB is a hard to translate, not because of language ofcourse. I have been working with phpBB for over 5 years now, and from time to time I have to upgrade. The reason why I fear upgrade with phpBB, they will always give me work. Work as a PHP hacker and work in my translations. MODs are even worse in that regard, since most MOD authors don't think about the translations at all.
I have been working with wordpress for over 2 years now, and I have to say it's a breeze maintaining both code and translations.
With Wordpress they use GNUtext, it seperates the "language" from the coding. No longer I work in "PHP code" files I have to hunt down in places in the code tree of the program. I just use POedit, I scan the plugin directory (yes, more room for improvement for phpBB, all code of a plugin is located in a single directory!.
This means that I can focus on a correct translation, but putting a translation file into the language directory the translation is done. Without touching php code, meaning I cannot break the plugin (mod) or software I work on.
So pro's for a translator:
1. Work on translating, instead of PHP code. Code and Text are seperates resources.
2. Do'nt worry about "coding" your translation into PHP correctly (if you do make mistakes now it breaks the code, and is hard to find).
3. No hunting for php files with "text" that need translation, POedit helps you there, it finds text.
One improvement for MODs would be that they stay in a single directory. Instead of having a single "language" directory, every MOD should have it's own language. Now I know this might give some performance issue, but I would improve on more then just translation. I mean having to hunt for phpBB code, to find the code that belongs, to "patch" instead of "plugin". I noticed that there is a lot of talk on moving toward a more plugable codebase. DO THAT!
I also coded on a plugin that connects phpBB3 and wordpress, in the form of a widget (recent_posts_phpBB3). From that I learned that its simple to implement for a developer, so simple its hard to agrue not using it
Pro's for developer:
1. Easy of implementation, it's adding some simple libs and statements to your code, but not intrusive. No lookup's in the code, you code like you normally do.
2. Seperate the code from the text, making it simple for the translators.
3. More translations can be added, simply by adding the translation files.
O, right, and all the talk on performance. I have seen wordpress on large sites, it works. It performs. Lets look at other projects, like wordpress how they use GNUtext...
Please add GNUtext to a future release, its good for the phpBB ecosystem. Its good coding practice, and, it will give more people the possibility to giveback doing translations.
As a MOD translator (ea. Anti-SPAM ACP, Download MOD [from phpBB2.x onward from time to time]) I find that phpBB is a hard to translate, not because of language ofcourse. I have been working with phpBB for over 5 years now, and from time to time I have to upgrade. The reason why I fear upgrade with phpBB, they will always give me work. Work as a PHP hacker and work in my translations. MODs are even worse in that regard, since most MOD authors don't think about the translations at all.
I have been working with wordpress for over 2 years now, and I have to say it's a breeze maintaining both code and translations.
With Wordpress they use GNUtext, it seperates the "language" from the coding. No longer I work in "PHP code" files I have to hunt down in places in the code tree of the program. I just use POedit, I scan the plugin directory (yes, more room for improvement for phpBB, all code of a plugin is located in a single directory!.
This means that I can focus on a correct translation, but putting a translation file into the language directory the translation is done. Without touching php code, meaning I cannot break the plugin (mod) or software I work on.
So pro's for a translator:
1. Work on translating, instead of PHP code. Code and Text are seperates resources.
2. Do'nt worry about "coding" your translation into PHP correctly (if you do make mistakes now it breaks the code, and is hard to find).
3. No hunting for php files with "text" that need translation, POedit helps you there, it finds text.
One improvement for MODs would be that they stay in a single directory. Instead of having a single "language" directory, every MOD should have it's own language. Now I know this might give some performance issue, but I would improve on more then just translation. I mean having to hunt for phpBB code, to find the code that belongs, to "patch" instead of "plugin". I noticed that there is a lot of talk on moving toward a more plugable codebase. DO THAT!
I also coded on a plugin that connects phpBB3 and wordpress, in the form of a widget (recent_posts_phpBB3). From that I learned that its simple to implement for a developer, so simple its hard to agrue not using it
Pro's for developer:
1. Easy of implementation, it's adding some simple libs and statements to your code, but not intrusive. No lookup's in the code, you code like you normally do.
2. Seperate the code from the text, making it simple for the translators.
3. More translations can be added, simply by adding the translation files.
O, right, and all the talk on performance. I have seen wordpress on large sites, it works. It performs. Lets look at other projects, like wordpress how they use GNUtext...
Please add GNUtext to a future release, its good for the phpBB ecosystem. Its good coding practice, and, it will give more people the possibility to giveback doing translations.
Re: Translations -- use GNU GetText please
Definitively a good system, a +1 from me!
Re: Translations -- use GNU GetText please
I'm not sure what symfony1 does, but Symfony2 does not use gettext. It has a custom parser for the XLIFF format. There are however tools to convert between PO and xliff.Kudlaty wrote:symfony already use gettext
One of the things I don't like about these is that you no longer have a 'language key' for translation. This means your 'key' is the sentence itself, and if it ever changes, you have to change it in ALL language files. Correct? How do others deal with this?
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: Translations -- use GNU GetText please
That doesn't sound very backwards compatobleigorw wrote:I'm not sure what symfony1 does, but Symfony2 does not use gettext. It has a custom parser for the XLIFF format. There are however tools to convert between PO and xliff.Kudlaty wrote:symfony already use gettext
One of the things I don't like about these is that you no longer have a 'language key' for translation. This means your 'key' is the sentence itself, and if it ever changes, you have to change it in ALL language files. Correct? How do others deal with this?
I also don't like "__" as a function name.
~Callum