copiada la rama presu_cliente_v2 en esta para poder hacer el merge al main

This commit is contained in:
2024-11-07 19:20:12 +01:00
parent aeb5f9106f
commit a880355012
84 changed files with 2983 additions and 1785 deletions

View File

@ -15,4 +15,15 @@ class Language extends BaseController
$url = previous_url();
return redirect()->to($url);
}
// Function to get the translation of the language file from a AJAX request
public function getTranslation()
{
$translationFile = $this->request->getPost('translationFile');
$locale = $this->request->getPost('locale');
$path = "Language/{$locale}/$translationFile.php";
$lang = require APPPATH.$path;
return json_encode($lang);
}
}