Add internationalization to jobs controller
This commit is contained in:
@@ -2,6 +2,19 @@
|
||||
|
||||
class Jobs extends CI_Controller {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
|
||||
// load language file
|
||||
$this->lang->load(strtolower($this->router->class));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get jobs belonging to projects owned by the user.
|
||||
*/
|
||||
public function getOwn() {
|
||||
$query = $this->db->order_by('progress', 'desc')
|
||||
->get_where('jobs', array('started_by' => $this->session->userdata('user_id')));
|
||||
@@ -14,10 +27,10 @@ class Jobs extends CI_Controller {
|
||||
|
||||
switch($progress) {
|
||||
case -1:
|
||||
$progress = "Warte auf Start...";
|
||||
$progress = lang('waiting');
|
||||
break;
|
||||
case 100:
|
||||
$progress = "Fertig";
|
||||
$progress = lang('done');
|
||||
break;
|
||||
default:
|
||||
$progress = $progress . "%";
|
||||
|
||||
7
application/language/english/jobs_lang.php
Normal file
7
application/language/english/jobs_lang.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$lang['done'] = "Complete";
|
||||
$lang['waiting'] = "Waiting for start...";
|
||||
|
||||
/* End of file projects_lang.php */
|
||||
/* Location: ./application/language/english/jobs_lang.php */
|
||||
7
application/language/german/jobs_lang.php
Normal file
7
application/language/german/jobs_lang.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$lang['done'] = "Fertig";
|
||||
$lang['waiting'] = "Warte auf Start...";
|
||||
|
||||
/* End of file projects_lang.php */
|
||||
/* Location: ./application/language/german/jobs_lang.php */
|
||||
Reference in New Issue
Block a user