dhii / wp-i18n
Internationalization for WP
v0.1.0
2018-11-23 16:47 UTC
Requires
- php: ^5.3 | ^7.0
- dhii/i18n-abstract: ^0.1
- dhii/i18n-base: ^0.1
- dhii/i18n-interface: ^0.2
Requires (Dev)
- 10up/wp_mock: dev-dev
- codeclimate/php-test-reporter: <=0.3.2
- dhii/data-key-value-aware-interface: ^0.1
- dhii/php-cs-fixer-config: dev-php-5.3
- dhii/stringable-interface: ^0.1
- phpunit/phpunit: ^4.8
- ptrofimov/xpmock: ^1.1
This package is auto-updated.
Last update: 2024-10-07 15:14:03 UTC
README
Internationalization for WP
Conventional WordPress means of i18n prevent us from writing good code. What this package solves:
- Use Dependency Injection, and avoid global state.
- De-couple your code from the global
__()
function, and thus from WP itself. - Remove the duplicate hard-coded text domain; instead, centralize it, and de-couple consuming logic from it.
- Use a standards-compliant mechanism, while continuig to use the same familiar gettext tools, like Poedit.
- Make your code more testable.
For more information about the how and why, please see the Wiki documentation.