Download the PHP package molajo/language without Composer
On this page you can find all versions of the php package molajo/language. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download molajo/language
More information about molajo/language
Files in molajo/language
Package language
Short Description Molajo Language Services for PHP Applications
License MIT
Homepage http://github.com/Molajo/Language
Informations about the package language
======= Language Package
Language Services supporting translations for the User Interface for PHP applications using Adapters for different implementation types.
How to specify Language
Language strings are loaded in startup for language determined in this order (and installed):
- Injected value during class instantiation
- Session
- User Data
- Client Language
- Application Configuration
- Defaults to en-GB
Instantiation
To instantiate the Language Class:
Once instantiated, all calls to the class can be made using the $language instance.
Language Properties
To retrieve the key value (ex. 'en-GB') for the language which is loaded:
Retrieve Language Strings
To retrieve all language strings and translations for the loaded language:
Retrieve List of all installed Languages
To retrieve a list of all languages installed in this application:
Retrieve Language Attribute
To retrieve a registry attribute value (id, name, rtl, local, first_day) for the loaded language:
Retrieve all Language Attributes
To retrieve all registry attribute values as an array for the loaded language:
Translate
To translate the string $xyz:
To retrieve a list of language strings and translations matching a wildcard value:
Identify Untranslated Strings
To insert strings found in code but are not already in database:
- If an administrator is logged on, the primary language services automatically insert untranslated strings
- To avoid doing so, override the
LanguagePlugin
and setinsert_missing_strings
to0
- For instances you define, set the
insert_missing_strings
, as needed.
To log strings found in code, but are not already in database:
- Set the Application configuration option
profile_missing_strings
to1
and turn onprofiling
Requirements and Compliance
- PHP framework independent, no dependencies
- Requires PHP 5.4, or above
- Semantic Versioning
- Compliant with:
- [phpDocumentor2] (https://github.com/phpDocumentor/phpDocumentor2)
- [phpUnit Testing] (https://github.com/sebastianbergmann/phpunit)
- Author AmyStephen
- [Travis Continuous Improvement] (https://travis-ci.org/profile/Molajo)
- Listed on [Packagist] (http://packagist.org) and installed using [Composer] (http://getcomposer.org/)
- Use github to submit pull requests and features
- Licensed under the MIT License - see the
LICENSE
file for details