OS Property support center

City translation and URL?

More
11 years 6 months ago #20304 by Sky
City translation and URL? was created by Sky
I could use a bit of help if anyone knows.

First is how to get city translation with falang? I got it in DB, but dont know how to get it in property details...

Other thing is, i would like to get alias url for each property. without SEF. Anyone knows how to get title of property in URL?

Thank You!

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #20305 by Mr. Dam
Replied by Mr. Dam on topic Re: City translation and URL?
Hi Sky,
Can you explain more details your question? You want to translate the city names to other languages?
Thanks
Dam

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #20306 by Sky
Replied by Sky on topic Re: City translation and URL?
Yes, i got them in falang DB, made xml file, even in module for property search its translated, but need to have it in component as well.
For example, City: New York City, i need translation on russian for example, or arabic, which is not written New York, but on russian its "Нью-Йорк", same goes for provices..

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #20318 by Mr. Dam
Replied by Mr. Dam on topic Re: City translation and URL?
Hi,
In the file components > com_osproperty > helpers > common.php
Function
function loadCityName($city){
global $mainframe;
$db = JFactory::getDBO();
$db->setQuery("Select city from #__osrs_cities where id = '$city'");
$city_name = $db->loadResult();
return $city_name;
}

Please change it to

function loadCityName($city){
global $mainframe;
$db = JFactory::getDBO();
$db->setQuery("Select id,city from #__osrs_cities where id = '$city'");
$city = $db->loadObject();
return $city->city;
}

Good luck
Dam

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #20345 by Sky
Replied by Sky on topic Re: City translation and URL?
Thank You very much !!! You've been nothing but helpful !!! :woohoo:

But as me, i have another question :) Is there a way to do this for States?

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan