- Posts: 3
- Thank you received: 0
OS Property support center
English & Portuguese (en + pt-BR) languages issue
- Jimmy
- Topic Author
- Offline
- New Member
-
Less
More
10 years 11 months ago - 10 years 11 months ago #45467
by Jimmy
English & Portuguese (en + pt-BR) languages issue was created by Jimmy
Congrats, once again, on a storming piece of coding! 
This is a weird one. I have a new site running Joomla 3.3 with two languages: English and Brazilian Portuguese (pt_BR)
On the Main Menu (en), the link to osProperty (Front Page) is working properly
www.xxxx.com/en/real-estate
On the Main Menu (pt), clicking on the link was giving a Requested Page Not Found error (in Portuguese)
www.xxxx.com/pt_br/bens-imoveis (still not sure if the translation is good - lol)
With SEF URLs disabled the result was the same.
www.xxxx.com/index.php?option=com_osprop...h&Itemid=112&lang=en
www.xxxx.com/index.php?option=com_osprop...temid=191&lang=pt_br
The language switcher had the same effect.
I think where I'd actually screwed things up was, because I couldn't get the language pack for pt-PT, I'm using pt-BR so I copied and renamed the pt-PT ini files to give me e.g. public_html/language/pt-BR/pt-BR.com_osproperty.ini. The error was because the query is looking for c.category_name_pt rather than c.category_name_pt_br (which does exist in the database).
As a workaround, I went into helper.php and, at line 413, I now have:
Curiously, it shouldn't have worked initially because I'd made a mistake by forgetting to prepend the suffix with the underscore, but it did??
It may be unconnected but, in the admin under Configuration > General > Business settings > Intro text Homepage, there is no facility to add the Portuguese language version so now I'm a bit concerned that my "fix" may have screwed up something else that I can't see yet. Any thoughts?
Jimmy

This is a weird one. I have a new site running Joomla 3.3 with two languages: English and Brazilian Portuguese (pt_BR)
On the Main Menu (en), the link to osProperty (Front Page) is working properly
www.xxxx.com/en/real-estate
On the Main Menu (pt), clicking on the link was giving a Requested Page Not Found error (in Portuguese)
www.xxxx.com/pt_br/bens-imoveis (still not sure if the translation is good - lol)
With SEF URLs disabled the result was the same.
www.xxxx.com/index.php?option=com_osprop...h&Itemid=112&lang=en
www.xxxx.com/index.php?option=com_osprop...temid=191&lang=pt_br
The language switcher had the same effect.
I think where I'd actually screwed things up was, because I couldn't get the language pack for pt-PT, I'm using pt-BR so I copied and renamed the pt-PT ini files to give me e.g. public_html/language/pt-BR/pt-BR.com_osproperty.ini. The error was because the query is looking for c.category_name_pt rather than c.category_name_pt_br (which does exist in the database).
Code:
Erro: 1054 Unknown column 'c.category_name_pt' in 'field list' SQL=Select a.*, b.state_name,c.category_name_pt as category_name,e.type_name_pt as type_name from jos_osrs_properties as a inner join jos_osrs_states as b on a.state = b.id inner join jos_osrs_categories as c on a.category_id = c.id inner join jos_osrs_types as e on e.id = a.pro_type where a.published = '1' and a.approved = '1' and c.published = '1' and e.published = '1' order by rand() limit 1
As a workaround, I went into helper.php and, at line 413, I now have:
Code:
// $prefix = '_' . substr($activeLanguage, 0, 2);
// I've commented out the line above because, on this site, when the language is switched, $activeLanguage, is pt-BR so...
$prefix = '_' . strtolower($activeLanguage);
$prefix = str_replace("-","_",$prefix); // giving us _pt_br which is the suffix for the field name we're looking for in jos_osrs_categories
Curiously, it shouldn't have worked initially because I'd made a mistake by forgetting to prepend the suffix with the underscore, but it did??
It may be unconnected but, in the admin under Configuration > General > Business settings > Intro text Homepage, there is no facility to add the Portuguese language version so now I'm a bit concerned that my "fix" may have screwed up something else that I can't see yet. Any thoughts?
Jimmy
Last edit: 10 years 11 months ago by Jimmy. Reason: correction of a variable name ;-)
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13059
- Thank you received: 1696
10 years 11 months ago #45469
by Mr. Dam
Replied by Mr. Dam on topic English & Portuguese (en + pt-BR) languages issue
Hi Jimmy,
Can you please submit ticket and send your site information with super admin acc, ftp account. I will check the reported issue for you
Thanks
Dam
Can you please submit ticket and send your site information with super admin acc, ftp account. I will check the reported issue for you
Thanks
Dam
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.