- Expression Engine 2.x
- Plugins
- Get Text Plugin
Get Text Plugin
license |
GPLv3 |
version |
1.1.4 |
author |
Can Oğuz |
Last Updated |
16.03.2012 |
Outputs text from language files without enabling PHP in your templates. You can also use this template as an alternative method to output MLS translations.
Features
- Fully compatible with MLS.
- Support for EE 2.x language files
- Support for EE 2.x third party add-on translations.
- Support for CodeIgniter system language files.
Index
Installation
Put the folder from the unpacked file into “third_party” folder.
Parameters
-
addon_name
The value must be equal to the addon's folder name.
i.e. for MLS addon_name="bbr_multilanguagesupport" -
key
This defines the array key, in other words this defines which text to call from within the language file.
You must define a valid key to get an output. -
language
Defines in which language you want the text to be outputted.
It must be given a valid value that matches the existing language folder names.
When used with MLS extension, the value of this parameter is auto-set by the plugin.
i.e. english, turkish, etc. -
language_file
Defines the language file name from which you want to get the translation. You have to enter the file name without the pre-and-postfixes such as ".php", "lang.", and "_lang". -
language_folder
Defines the main language folder.
tp, ee, ci
tp: Third Party Languages - must be used with addon_name parameter.
ee: Expression Engine 2.x Core Languages
ci: CodeIgniter system languages.
CAUTION
You must specificy a value for addon_name if language_folder parameter is set to tp.
NOTICE
When using to output MLS translation you only need to provide key parameter.
Usage
Below you can find some examples to get you started:
Get the text with the key htaccess_written_successfully in Turkish language from lang.blacklist.php of EE core files:
{exp:bbr_gettext language="turkish" language_folder="ee" language_file="blacklist" key="htaccess_written_successfully"}
Get the hdn-options text of the third party addon MLS in Turkish
{exp:bbr_gettext language="turkish" language_folder="tp" language_file="blacklist" key="hdn-options" addon_name="bbr_multilanguagesupport"}
Real usage example with MLS
{exp:bbr_gettext key="title-login"}