mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadido coger el idioma
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user