add method jsonr in get json definitions
This commit is contained in:
@@ -1068,6 +1068,21 @@ class Light
|
||||
$response['timeZone'] = sprintf( "GMT%s%02d:%02d", ( $offset >= 0 ) ? '+' : '-', abs( $offset / 3600 ), abs( ($offset % 3600) / 60 ) );
|
||||
$fields = \System::getSysInfo();
|
||||
$response['version'] = $fields['PM_VERSION'];
|
||||
|
||||
$Translations = new \Translation;
|
||||
$translationsTable = $Translations->getTranslationEnvironments();
|
||||
$languagesList = array ();
|
||||
|
||||
foreach ($translationsTable as $locale) {
|
||||
$LANG_ID = $locale['LOCALE'];
|
||||
if ($locale['COUNTRY'] != '.') {
|
||||
$LANG_NAME = $locale['LANGUAGE'] . ' (' . (ucwords( strtolower( $locale['COUNTRY'] ) )) . ')';
|
||||
} else {
|
||||
$LANG_NAME = $locale['LANGUAGE'];
|
||||
}
|
||||
$languagesList[$LANG_ID] = $LANG_NAME;
|
||||
}
|
||||
$response['listLanguage'] = $languagesList;
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user