- Posts: 16
- Thank you received: 3
OS Property support center
City translation and URL?
- Sky
- Topic Author
- Offline
- New Member
-
Less
More
12 years 5 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!
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.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13020
- Thank you received: 1688
12 years 5 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
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.
- Sky
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 3
12 years 5 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..
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.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13020
- Thank you received: 1688
12 years 5 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
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.
- Sky
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 3
12 years 5 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?
But as me, i have another question

Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Nguyen Phu Quan
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.