websafe / zf-mod-zfc-user-i18n
Multi language pack module for the ZF-Commons/ZfcUser module. Currently contains: de_DE, ja_JP, pl_PL translations.
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Language:Shell
Type:zf-module
Requires
- php: >=5.3.3
Requires (Dev)
- websafe/zf-mod-zfc-user-i18n-de-de: dev-master
- websafe/zf-mod-zfc-user-i18n-ja-jp: dev-master
- websafe/zf-mod-zfc-user-i18n-pl-pl: dev-master
Suggests
- zf-commons/zfc-user: This module is a set of translations / language packs for [zf-commons/zfc-user], so You probably should install it too.
This package is not auto-updated.
Last update: 2024-11-19 02:24:34 UTC
README
pl_PL, de_DE, ja_jP and ru_RU translations are now merged into ZF-Commons/ZfcUser master branch :-)
Translation continues there.
WebsafeZfModZfcUserI18n
Multi language pack module for the ZF-Commons/ZfcUser module.
Currently contains following languages/locales/translations:
- de_DE: report an issue with de_DE | edit de_DE.po
- ja_JP: report an issue with ja_JP | edit ja_JP.po
- pl_PL: report an issue with pl_PL | edit pl_PL.po
Each translation is located in a separate repository (linked above).
This module (WebsafeZfModZfcUserI18n) simply collects all .po
files from
coresponding single-language repositories during the build process.
For details about the build process see this repositories
composer.json
-> require-dev
and scripts/build/build.sh
.
Installation
Chdir into Your projects root directory (where composer.json
resides)
and run the following command:
composer require websafe/zf-mod-zfc-user-i18n:dev-master --prefer-dist
Configuration
Enabling the multi language pack module in Your ZF2 application
In config/application.conf.php
add WebsafeZfModZfcUserI18n
after
ZfcUser
:
<?php return array( 'modules' => array( // ... 'ZfcUser', 'WebsafeZfModZfcUserI18n', // ... ), // ... );
Set the locale
This step is not really required - it depends on how the locale is initialized in Your application.
In config/global.conf
or module/Application/config/module.config.php
add:
// ... 'translator' => array( 'locale' => 'AVAILABLE_LOCALE', // ... ), // ...
Replace AVAILABLE_LOCALE
with de_DE
, ja_JP
or pl_PL
. See list of
available translations at the top of this README.
Updating
Chdir into projects root directory (where composer.json
resides)
and run the following commands:
rm -rf ~/.composer/cache/files/websafe/zf-mod-zfc-user-i18n* composer update websafe/zf-mod-zfc-user-i18n
The rm -rf ...
part is needed when the module was installed with
--prefer-dist
. Without cleaning up the cache before installing - Composer
will probably stick to a cached version.
Contributing
If You want to help with translation, just:
and after all send a pull request.
When You're not familiar with editing .po
files - simply:
If You want to add a new language:
- report an issue and I will create a repo for Your language, compatible with existing single-language module repos.
Compiling .po files to .mo files
There's no need to compile .po
files after the installation or before sending
pull requests, but if you modify the .po
file locally, recompile it by
executing the following command in this modules root directory:
msgfmt -cv -o language/de_DE.mo language/de_DE.po