I am building a multilingual web site.
By absolutely no means cannot get the new module details page system text strings like author, date to be translated.
I found a similar thread:
http://forum.cmsmadesimple.org/viewtopi ... 28&t=61075
But the solution will not work for me, as I would need it for 3 languages to be set automatically. And why to translate the strings within the template if they are already translated within the module.
Just need to find a way to tell the module to use the language set in URL.
Or somehow change the site default language "on fly".
Thanks for looking..
NEWS - Translation not showing in Detail Template
Re: NEWS - Translation not showing in Detail Template
Read Optional Extensions at my blog https://www.cmscanbesimple.org/blog/mul ... ade-simple
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: NEWS - Translation not showing in Detail Template
Thanks for the fast reply, but I don't quite understand...
Do you suggest to alter the news module detail page template to change say {$author_label} that I am desperately trying to become language aware to something like:
{$languagestring.author_label} ?
And this way, again, manually translate the already translated module?
Do you suggest to alter the news module detail page template to change say {$author_label} that I am desperately trying to become language aware to something like:
{$languagestring.author_label} ?
And this way, again, manually translate the already translated module?
Re: NEWS - Translation not showing in Detail Template
Can't I somehow change the $param['lang'] from within the UDT or something before it will affect the news module detail page?
Re: NEWS - Translation not showing in Detail Template
I've came up with a VERY dirty solution.. But it works towards the way it should be:
If I put this into a UDT included as the first thing in the template, it works.
Code: Select all
$_SERVER['REQUEST_URI_PATH'] = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$segments = explode('/', $_SERVER['REQUEST_URI_PATH']);
if (isset($segments[1]) && strlen($segments[1]) == 2) {
$lang = $segments[1];
$page_lang=$lang;//$cgsimple->get_root_alias();
if ($page_lang=='en') {
$page_lang_suffix = "US";
} else {
$page_lang_suffix = strtoupper($page_lang);
}
if (get_site_preference('frontendlang') != $page_lang.'_'.$page_lang_suffix){
set_site_preference('frontendlang',$page_lang.'_'.$page_lang_suffix);
header('Location: '.$_SERVER['REQUEST_URI']);
exit;
}
}
Re: NEWS - Translation not showing in Detail Template
No reply... Strange..
Another question, is how to make news articles to be linked with each their correspondences in other languages?
Another question, is how to make news articles to be linked with each their correspondences in other languages?