From 30255c1dae78d136a950e648f6cd046236c80710 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 16 Jul 2012 14:45:49 +0200 Subject: [PATCH] Added getLanguages() and getIconPath() --- .../files/lib/data/language/Language.class.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/wcfsetup/install/files/lib/data/language/Language.class.php b/wcfsetup/install/files/lib/data/language/Language.class.php index 6d0b783e46..2d5c2e9cad 100644 --- a/wcfsetup/install/files/lib/data/language/Language.class.php +++ b/wcfsetup/install/files/lib/data/language/Language.class.php @@ -181,6 +181,24 @@ class Language extends DatabaseObject { setlocale(LC_CTYPE, $this->get('wcf.global.locale.unix').'.UTF-8', $this->get('wcf.global.locale.unix'), $this->get('wcf.global.locale.win')); } + /** + * Returns language icon path. + * + * @return string + */ + public function getIconPath() { + return WCF::getPath() . 'icon/flag/'.$this->countryCode.'.svg'; + } + + /** + * Returns a list of available languages. + * + * @return array + */ + public function getLanguages() { + return LanguageFactory::getInstance()->getLanguages(); + } + public function __wakeup() { $this->packageID = PACKAGE_ID; } -- 2.20.1