Add translation system (#85)

This commit is contained in:
Miguel Ribeiro
2024-01-23 22:46:26 +01:00
committed by GitHub
parent d287f303f0
commit d7366dcfb0
35 changed files with 965 additions and 317 deletions
+5 -4
View File
@@ -15,7 +15,7 @@
) {
$response = [
"success" => false,
"errorMessage" => "Please fill all mandatory fields"
"errorMessage" => translate('fill_mandatory_fields', $i18n)
];
echo json_encode($response);
} else {
@@ -33,7 +33,7 @@
if ($result === false) {
$response = [
"success" => false,
"errorMessage" => "Error saving notifications data"
"errorMessage" => translate('error_saving_notifications', $i18n)
];
echo json_encode($response);
} else {
@@ -57,13 +57,14 @@
if ($stmt->execute()) {
$response = [
"success" => true
"success" => true,
"message" => translate('notifications_settings_saved', $i18n)
];
echo json_encode($response);
} else {
$response = [
"success" => false,
"errorMessage" => "Error saving notification data"
"errorMessage" => translate('error_saving_notifications', $i18n)
];
echo json_encode($response);
}