Check the current status of i18n / L10n
Updated by Sebastian Kurfuerst over 10 years ago
Just had a quick look, generally well-structured. Some things which caught my attention:
- F3\FLOW3\I18n\Service should be called "LocaleService"
- inside the "XliffTranslationProvider", the $xliffBasePath is hardcoded to a directory inside FLOW3 (FLOW3/Private/Locale/Translations). This needs to be done per-package, as each package should be allowed to provide localizations. I am not fully sure yet how this should look like; most probably one needs to specify the current package. Inside the Translate ViewHelper, we could automatically set the current package by default.
Updated by Karsten Dambekalns over 10 years ago
- Status changed from New to Accepted
- Assignee set to Karsten Dambekalns
Today I played around with I18n in FLOW3. My goal was to add translated labels to at least some pages of the Blog. I succeeded1, but there are still some open ends. As was to be expected. :)
Second, I18n has to be initialized, see this change for that:
The documentation does not tell where to put XLIFF files, and in fact the lookup is too restrictive currently. It expects files at resource://FLOW3/Private/Locale/Translations/ - so all translation files would have to be in the FLOW3 package. That obviously does not make sense. I created an issue for this:
And finally we probably need a way to automatically extract translateable stuff from source (Fluid templates to begin with) and create XLIFF from it. Translation is nicely possible with Pootle (tried that today), but creating an initial XLIFF file needs some love. If someone knows about a tool for that, let us know!
Updated by Rens Admiraal over 10 years ago
- Estimated time set to 0.00 h
Extended I18n class to support plural / replacement values, and added comment to the XLIFF project about our suggestion for an API.
This change would actually better reflect current PHP functionality in ExtJS4