<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<?php foreach($pages->get("/treatments/")->children as $t) {
$count = $pages->count("template=clinic, cliniclocation=$page->id, treatmentprice.clinictreatments=$t->id");
if ($count!=0){
echo "<a class='dropdown-item' href='$page->url$t->name'>$t->title ($count)</a>";}
} ?>
</div>
Hi you see code above.
Its a multi language web site.
When i change the language instead of default language, url section ( t->name ) not change!
for ex:
default language english
http://www.domain.com/en/locations/turkey/dental-implant
select turkish language
http://www.domain.com/tr/konumlar/turkey/dental-implant
it must be
http://www.domain.com/tr/konumlar/turkey/dis-implanti
if i use
$t->title
instead of
$t->name
translation works fine but not as url. as usual it echoes title
it look like
http://www.domain.com/tr/konumlar/turkey/Dis Implati
if i use $t->url
it echo konumlar/turkey/dis-implati
so if i get last segment of url it will works fine.
What can i do for that?