Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

How can I display country name instead of constant COM_COMMUNITY_LANG_NAME

10 years 1 month ago
Licenses:
JomSocial Expired Socialize Expired

Hi,
I want to display additional informations in the members list of Jomsocial. One is the corresponding country name for each user.
I added code in the file /templates/jomsocial/layouts/people.browse.php:

<p><b>Country1: </b><?php echo JText::_($row->user->getInfo('FIELD_COUNTRY')); ?>
<p><b>Job description: </b><?php echo $row->user->getInfo('FIELD_STELLEN'); ?></p>

In some cases I get a correct country name. In most cases I get the country code i.e. COM_COMMUNITY_LANG_NAME_EGYPT
All other fields are displayed correctly.

The language file "en-GB.com_community.country.ini" is installed.

You can see the result here: test.wosh.org/index.php/en/wosh-community/all-heroes

I would be very glad about your help!
With kind regards
Burghard

10 years 1 month ago
Licenses:

Hi, Burghard.

It's because country names are stored in database as language constants - not names.
I assign developer to this thread for further explanation...


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
10 years 1 month ago
Licenses:

Hi,

if you got incorrect country name. you must put that language at:
/language/en-GB/en-GB.com_community.ini

i.e:
COM_COMMUNITY_LANG_NAME_EGYPT="Egypt"

or the fastes way, copy all content from /language/en-GB/en-GB.com_community.country.ini to /language/en-GB/en-GB.com_community.ini

Regards

The following user(s) said Thank You: Burghard Stanneck
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW