1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
<?php
/**
* TfLanguage trait file.
*
* Provides common access to system languages.
*
* @copyright Simon Wilkinson 2013+ (https://tuskfish.biz)
* @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html GNU General Public License (GPL) V2
* @author Simon Wilkinson <[email protected]>
* @since 1.0
* @package core
*/
/**
* Provides common access to system languages.
*
* @copyright Simon Wilkinson 2013+ (https://tuskfish.biz)
* @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html GNU General Public License (GPL) V2
* @author Simon Wilkinson <[email protected]>
* @version Release: 1.0
* @since 1.03
* @package core
*
*/
trait TfLanguage
{
/**
* Returns a list of languages for the content object submission form.
*
* In the interests of brevity and sanity a full list is not provided. Add entries that you
* want to use to the array using ISO 639-1 two-letter language codes, which you can find at:
* https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes. Be aware that deleting entries that
* are in use by your content objects will cause errors.
*
* @return array Array of languages in ISO 639-1 code => name format.
*/
public function getListOfLanguages()
{
return array(
"en" => "English",
"th" => "Thai",
);
}
}