I have a issue with my language switcher when i'm in a entry page.
In this page, i rewrite the last-segment url witch is my product name with this script :
<?php
$outvar = "";
$langvar = "{transcribe:language_abbreviation}";
if ($langvar == "fr") {
$outvar = $outvar . 'search:url-title-fr="{transcribe:last_segment}" ';
}
if ($langvar == "nl") {
$outvar = $outvar . 'search:url-title-nl="{transcribe:last_segment}" ';
}
?>
{exp:channel:entries channel="products" <?php echo $outvar ?>}
The url become this :
FR : /fr/detail/MYPRODUCTNAMEINFRENCH
NL : /nl/detail/MYPRODUCTNAMEINDUTCH
Suppose my website is in French, when i click on my language switch (to show dutch version) i made with transcribe, i have :
/nl/detail/MYPRODUCTNAMEINFRENCH
the last segment stay in French.
Can you help to change this last segment when i switch language ?
Thanks
Jérôme