add method jsonr in get json definitions

This commit is contained in:
Ronald Quenta
2015-06-15 15:32:29 -04:00
parent 1734c92375
commit c6338995e0
4 changed files with 27 additions and 14 deletions

View File

@@ -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;
}