Spaces:
Sleeping
Sleeping
processmaker-community / processmaker-files /workflow /engine /src /ProcessMaker /BusinessModel /Language.php
Download processmaker-files/workflow/engine/src/ProcessMaker/BusinessModel/Language.php from kenken999/processmaker-community: direct link, hf CLI and curl.
- Browser
- Download file 920 Bytes
-
https://huggingface.co/spaces/kenken999/processmaker-community/resolve/main/processmaker-files/workflow/engine/src/ProcessMaker/BusinessModel/Language.php
- Command line
-
hf download hf://spaces/kenken999/processmaker-community/processmaker-files/workflow/engine/src/ProcessMaker/BusinessModel/Language.php
-
curl -L -o Language.php https://huggingface.co/spaces/kenken999/processmaker-community/resolve/main/processmaker-files/workflow/engine/src/ProcessMaker/BusinessModel/Language.php
920 Bytes
| namespace ProcessMaker\BusinessModel; | |
| use Translation; | |
| /** | |
| * Translation class | |
| * | |
| */ | |
| class Language | |
| { | |
| /** | |
| * Web Entry 2.0 Rest - Get languages | |
| * | |
| * @category HOR-3209,PROD-181 | |
| * @return array | |
| */ | |
| public function getLanguageList() | |
| { | |
| $Translations = new Translation(); | |
| $translationsTable = $Translations->getTranslationEnvironments(); | |
| $availableLangArray = []; | |
| foreach ($translationsTable as $locale) { | |
| $row = []; | |
| $row['LANG_ID'] = $locale['LOCALE']; | |
| if ($locale['COUNTRY'] != '.') { | |
| $row['LANG_NAME'] = $locale['LANGUAGE'].' ('. | |
| (ucwords(strtolower($locale['COUNTRY']))).')'; | |
| } else { | |
| $row['LANG_NAME'] = $locale['LANGUAGE']; | |
| } | |
| $availableLangArray [] = $row; | |
| } | |
| return $availableLangArray; | |
| } | |
| } | |