DH
Asked
Hi,
in app\controllers\admin\Cron.php, I have replaced the following line :
```php
echo '<p>Corn job successfully run.</p>';
```
with this one :
```php
echo lang('cron_finished');
```
I have created an entry both in language/french and language/english **cron_lang.php** file and, of course, translated the text into french in the french file BUT the text appears always into english either if I'm in english or in french 'context' ...
any idea,
thanks in advance,
sincerly,
Domi.
in app\controllers\admin\Cron.php, I have replaced the following line :
```php
echo '<p>Corn job successfully run.</p>';
```
with this one :
```php
echo lang('cron_finished');
```
I have created an entry both in language/french and language/english **cron_lang.php** file and, of course, translated the text into french in the french file BUT the text appears always into english either if I'm in english or in french 'context' ...
any idea,
thanks in advance,
sincerly,
Domi.
- MSAnsweredHello,
You can add `$this->lang->admin_load('cron');` after `parent::__construct();` in the `app/controllers/admin/Cron.php` to use the language in the file.
Can you try to select `French` from top bar at admin area. This will have priority over the system language as user language.
If you have added the `cron_finished` key to your language, it should be displaying message in your language.
Thank you - DHAnsweredHi,
thanks for your fast reply, very appreciated !
although I have put the line :
```php
class Cron extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->lang->admin_load('cron'); /* DH */
$this->load->admin_model('cron_model');
$this->Settings = $this->cron_model->getSettings();
}
```
my text is always in english, I have cleared the cache of the browser too and if I debug (netbeans), the **$this->language** contains only english text including my new cron_finished variable.
any other idea pls ?
Domi. - DHAnsweredhere is the cron_lang.php file (zipped).
Domi.Attachments - MSAnsweredHello,
The Cron controller extends `CI_Controller` please try to change to `MY_Controller`
Thank you - DHAnsweredHi Mian,
thanks ! the problem is fixed :-)
(maybe you can change it in the next version too ....)
another question : the system calls email_templates\cron.html which contains the following line :
```php
<strong>Cron Job has successfully run.</strong>
```
I have tried to change it with :
```php
<strong><?php echo 'cron_finished'); ?></strong>
```
but this has no effect, the line is not processed/dipslayed, any idea ?
have a nice day,
Domi. - MSAnsweredHello,
Email templates are static html files and there is no option to translate them yet. You can modify them directly.
Thank you - DHAnsweredHa ok Mian, I'm going to find a way therefore.
thanks for your reply,
Domi. - Login to Reply