translation problem in application\mdoels
for example i create
\fuel\application\models -> articles_model.php
i add
function __construct()
{
parent::__construct('articles'); // table name
$this->load->language('articles');
}
and i create
fuel\application\language\slovenian -> articles_lang.php file
but it always choose
fuel\application\language\english-> articles_lang.php file
even if i choose language slovenian in user preferences. translation works fine for modules. why not working here?
Comments
$this->load->language('authors');
Instead of "articles"?
Even if language is set to slovenian i get this error:
An Error Was Encountered Unable to load the requested language file: language/english/authors_lang.php
i thing problem is in config.php where is set
$config['language'] = "english";
and even if i change in admin to "slovenian" still choose english in some modules...
if i change to
$this->load->language('articles', 'slovenian');
then works. But i don't want use fixed language...
$lang['form_label_formatting'] = 'Formatiranje'; $lang['form_label_author'] = 'Avtor'; $lang['form_label_sticky'] = 'Lepljiv'; $lang['form_label_allow_comments'] = 'Dovoli komentarje'; $lang['form_label_categories'] = 'Kategorije';
but at form is half english half in our language. Why?
$this->config->set_item('language', 'slovenian'); $this->load->language('articles', 'slovenian');
When you say 'i change in admin to "slovenian" still choose english' where are you referring?
I want to change all form languages when I go to http://url/fuel/my_profile/edit and when I change here language to slovenian all forsm must be translated... the same when I click english...
what can I do? now
$this->load->language('articles');
use english language if I set slovenian in admin (http://url/fuel/my_profile/edit)
$this->config->set_item('language', $my_lang);
$user_lang = $this->fuel_auth->user_lang(); $this->config->set_item('language', $user_lang); $this->load->language('articles');
I'll look into perhaps having that set automatically
// set the language based on first the users profile and then what is in the config... (FYI... fuel_auth is loaded in the hooks) $language = $this->fuel_auth->user_data('language'); $this->config->set_item('language', $language);
$this->config->set_item('language', $language);
I am still having problems, Now i get error "Unable to load the requested language file: fuel/fuel/codeigniter/language/english/fuel_lang.php". I don't know why searching it there!