Multilanguage View Files not found

I'm struggling to call language specific Opt-in Controller pages. I found it out, but since I already wrote it down, I document it here.

here are my language settings:

// Languages for pages. The key is saved to the page variables
$config['languages'] = array(
    'de' => 'DE', //standard language
    'en' => 'EN',
    'cs' => 'CZ'
$config['language_mode'] = 'both';
$config['add_language_to_site_url'] = TRUE;
$config['language_force_default_to_site_url'] = TRUE;
$config['language_query_str_param'] = 'lang';
$config['language_cookie_name'] = '';
$config['language_cookie_exp'] = '63072000';
$config['language_use_cookies'] = false;
$config['language_detect_user_agent'] = '';
$config['language_default_option'] = 'de';

I want to call a simple static HTML page by its corresponding language http://localhost/de/portrait as described here:

View Pages
Additionally, if your pages are using views and there is a language value[1] set by the user using Fuel_language, it will first look for a view file in the views/language/{language}/ folder and if it doesn't find it, it will default to just the views folder.

I setup a view file here: fuel/application/views/language/de/portrait.php and I end up in a 404 Error.

Apparently a corresponding view file exist in the views/ root for the standard language and only secondary languages go into the /views/language/*/ folder:

fuel/application/views/portrait.php must exists for the default language and only
fuel/application/views/language/en/portrait.php and
fuel/application/views/language/cs/portrait.phpmust be placed in the views/language/{language}/

Can someone verify that? Is that the correct way? Is that also true for subfolders?

[1] Does that mean a language value is not set, when the default language is selected?

Thanks for clarification

Sign In or Register to comment.