diff --git a/main/admin/sub_language.php b/main/admin/sub_language.php
index a3d1a091d2..35bb957fee 100644
--- a/main/admin/sub_language.php
+++ b/main/admin/sub_language.php
@@ -1,6 +1,12 @@
});
});
';
-/* MAIN CODE */
+/**
+ * Main code
+ */
// setting the name of the tool
$tool_name = get_lang('CreateSubLanguage');
// setting breadcrumbs
@@ -265,7 +273,9 @@ function search_language_term($term, $search_in_variable = true , $search_in_eng
$list_info = array_unique_dimensional($list_info);
return $list_info;
}
-
+/**
+ * Output
+ */
//allow see data in sortetable
if (isset($_REQUEST['txt_search_word'])) {
//@todo fix to accept a char with 1 char
diff --git a/main/admin/sub_language_ajax.inc.php b/main/admin/sub_language_ajax.inc.php
index 995f2af199..9fc9082baf 100644
--- a/main/admin/sub_language_ajax.inc.php
+++ b/main/admin/sub_language_ajax.inc.php
@@ -1,5 +1,12 @@
$value_info) {
- $result_array[$key_value] = SubLanguageManager::write_data_in_file($path_folder, $value_info, $key_value);
- }
- $variables_with_problems = '';
- if (!empty($result_array)) {
+
+ foreach ($all_file_of_directory as $key_value=>$value_info) {
+ $result_array[$key_value] = SubLanguageManager::write_data_in_file($path_folder, $value_info, $key_value);
+ }
+ $variables_with_problems = '';
+ if (!empty($result_array)) {
foreach($result_array as $key =>$result) {
if ($result == false) {
- $variables_with_problems .=$key.'
';
- }
- }
- }
- if (!empty($variables_with_problems)) {
- echo $path_folder.' '.get_lang('IsNotWritable').'
'.api_ucwords(get_lang('ErrorsFound')).':
'.$variables_with_problems;
- } else {
- echo 1;
- }
+ $variables_with_problems .=$key.'
';
+ }
+ }
+ }
+ if (!empty($variables_with_problems)) {
+ echo $path_folder.' '.get_lang('IsNotWritable').'
'.api_ucwords(get_lang('ErrorsFound')).':
'.$variables_with_problems;
+ } else {
+ echo get_lang('Saved');
+ }
}
+