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.

Language Overrride of Groups Names and RadioButtons / Multiple Select Field

10 years 4 months ago
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

I'm looking to have a multi language site with Jomsocial, but I don't know how to configure the Language Overrride feature to create local translations for:

- Group Names
- Group Descriptions
- Custom Profile Fields Names
- Custom Profile Fields Contents for RadioButtons / Multiple Select Fields

Can you please provide a how-to guide with the steps?

Best regards, and happy 2015!

Paulo Vaz

10 years 4 months ago
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

After a deep search in the Forum Archive, I found a Wiki solution.

The article is here: documentation.jomsocial.com/wiki/Translate_Elements

I changed the en-GB.com.community.ini addind the constants and its content, making reference in the Field Names, Field Tooltips, Field Contents (for selection fields), and everything works fine. After, I moved these strings to the Override File (en-GB.overrride.ini) in the override folder, and everything works.

BUT...

For the Groups Names, I can't make it work using the same method.

Any suggestion about how to translate the groups names?

Thanks,

Paulo Vaz

10 years 4 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Paulo,

Please provide me the screenshoot which "Groups Names" do you mean?

thank you

10 years 4 months ago
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

Dimas,

Take a look on the 3 screenshoots attached.

1. The Group Administration screen in JomSocial menu, where I put the Group name as "COM_COMMUNITY_GROUP_STPET" (as you suggested in your wiki article).
2. The file where I insert the override string for this name (en-GB.com_community.ini) and I saved in the "ROOT\language\en-GB" folder
3. The result in the live site (not overrided).

If you need access to the real site, fell free to do it, I put the information about Joomla Admin in the appropriated fields of this topic

Regards,

Paulo Vaz.

Attachments:
10 years 4 months ago
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

And the same issue applies to the Toolbar Menu translation.

For some reason, this Override Method doesn't work for the Toolbar Menus too.

I follow the same procedure of insert the constants in the file en-GB.com_community.ini and pt-BR.com_community.ini (and accordind this wiki: documentation.jomsocial.com/wiki/Translate_Toolbar ). No effect at all...

Look the screenshots below, auto explained.

Any idea about how to solve these issues are very welcome. I have no idea what is wrong.

Regards,

Paulo Vaz.

Attachments:
10 years 4 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Paulo,

#1 I see, I thought the group from custom profile, right now the group is not supporting with multiple translation, because not designed like that

#2 Socialize menu is not using method like Jomsocial toolbar, for Joomla menu there is special setting for multiple translation, for more infomration you can ask to Joomla forum for that.. they will help you.

thank you

10 years 4 months ago
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

Hello Dimas,

After research more on Forums about Toolbar Trasnlation I found a simple way to translate that is create new menu options in other language under Jomsocial Menu, and also follow the instructions on this Joomla page: www.templatemonster.com/help/joomla-3-x-...tilanguage-site.html

So regarding the menus, no problem anymore, but regarding the Groups Names Translation I consider this very important to my project. What source code changes must be done in order to provide this functionality to Group Name display? I know maybe there are many points in the source code to be changed, but if can provide a single example about how to do it, I can search by myself the source code and change to make this functionality available.

Last but not least important don't you think someone needs to update and make the Wiki articles more clear on translations techniques? Because both mention this method can be used for Groups Names and Toolbar Menu translation (documentation.jomsocial.com/wiki/Translate_Elements and documentation.jomsocial.com/wiki/Translate_Toolbar)?

Regards,

Paulo Vaz.

10 years 4 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Paulo,

Ok this is the soution

Please you open this file components/com_community/templates/groups.list.php and groups.viewgroup.php, find this :

$group->name

replace to :
JText::_($group->name)

I hope it will help

thank you

10 years 4 months ago
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

Hi Dimas,

This hack solve the problem in the Groups main page, but not in the News Feed page (user timeline), that keeps showing the original group string without the override.

Look in the screenshot below:

Attachment ScreenShot2015-01-05at4.45.22PM.png not found



Can you please advise witch other files I need to change to show in everyplace the correct override language constant?

Another thing, if you could also provide the hack for the Group Description Field, in order to get both multilingual (name & descrpition).

Regards,

Paulo Vaz.

Attachments:
10 years 3 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

#1 for desc, find this :

$group->description

change to :
JText::_($group->description)

#2 related with stream you should check file group streams one by one /components/com_community/templates/default/activities.groups.*.php, find this $this->group->name and $this->group->description, and add code JText::_() code like above.

10 years 3 months ago
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

Hi Dimas,

I'm sorry but I did the changes in all the recommended files that I found the variables with the Name & Description of the groups, but in fact, without effect.

Look the occurrences/changes below, and please note some "$this->group->name" (without the $ before the word "group") in the findings that I also replaced (maybe needed, I'm not sure):


Find '->name' in '/Users/paulosantos/Desktop/myPets2/components-com_community-templates-default/activities.groups.create.php':

/Users/paulosantos/Desktop/myPets2/components-com_community-templates-default/activities.groups.create.php(49): <a href="<?php echo $this->group->getLink();?>"> <i class="joms-icon-users portrait-phone-only"></i> <?php echo JHTML::_('string.truncate',JText::_($this->group->name) , $truncateVal); ?></a>

Find '->name' in 'activities.groups.featured.php':

activities.groups.featured.php(40): <p><?php echo JText::_($group->name); ?></p>

Find '->name' in 'activities.groups.like.php':

/activities.groups.like.php(38): <a href="<?php echo $this->group->getLink();?>"> <i class="joms-icon-users portrait-phone-only"></i> <?php echo JHTML::_('string.truncate',JText::_($this->group->name), $truncateVal); ?></a>

Find '->name' in 'activities.groups.update.php':

activities.groups.update.php(19): <?php echo JText::sprintf('COM_COMMUNITY_GROUPS_GROUP_UPDATED' , $this->group->getLink() , JText::_($this->group->name) );?>

Find '->name' in 'activities.groups.join.php':

activities.groups.join.php(48): echo JText::sprintf('COM_COMMUNITY_GROUPS_GROUP_JOIN' , $this->group->getLink(), JText::_($this->group->name));

Find '->name' in 'groups.list.php':

/groups.list.php(29): <img src="<?php echo $group->getThumbAvatar();?>" alt="<?php echo $this->escape(JText::_($group->name)); ?>" class="cAvatar" />

groups.list.php(41): <?php echo $this->escape(JText::_($group->name)); ?>

Find '->name' in 'groups.viewgroup.php':

groups.viewgroup.php(37): <h3><?php echo JText::_($group->name); ?></h3>

groups.viewgroup.php(57): <img src="<?php echo $group->getAvatar( 'avatar' ) . '?_=' . time(); ?>" border="0" alt="<?php echo $this->escape(JText::_($group->name));?>" />

Find '->description' in 'activities.groups.create.php':

activities.groups.create.php(50): <p><?php echo JHTML::_('string.truncate',strip_tags(JText::_($this->group->description)) , $config->getInt('streamcontentlength')); ?></p>

Find '->description' in 'activities.groups.featured.php':

ctivities.groups.featured.php(43): <p><?php echo JHTML::_('string.truncate',strip_tags(JText::_($group->description)) , $config->getInt('streamcontentlength')); ?></p>

Find '->description' in 'activities.groups.like.php':

activities.groups.like.php(39): <p><?php echo JHTML::_('string.truncate',strip_tags(JText::_($group->description)) , $config->getInt('streamcontentlength')); ?></p>

Find '->description' in 'groups.list.php':

groups.list.php(45): <div class="cIndex-Status"><?php echo ($config->get('allowhtml')) ? JText::_($group->description) : $this->escape(JText::_($group->description)); ?></div>

Find '->description' in 'groups.viewgroup.php':

groups.viewgroup.php(99): <p><?php //echo JText::_($group->description); ?></p>

groups.viewgroup.php(287): <?php echo JText::_($group->description); ?>

There are another files that I need to change, or I did something wrong?

And more: the "Description" field never changed in any place, despite I have the Language Constant inside the override files.

Another interesting thing is that semicolon ";" that appears before the group names when you change the group cover. Look the screenshot below:

Attachment ScreenShot2015-01-06at3.53.01PM.png not found




Thanks for your kind attention,

Regards,

Paulo Vaz

Attachments:
10 years 3 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Paulo,

#1 the description only will show on activities.groups.create.php

#2 You are missing edit this file activities.groups.avatar.upload.php, and edit this file activities.photos.cover.php, code "$cTable->name: and add JText::_()

thank you

10 years 3 months ago
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired Socialize Expired

Dimas,

Thanks.

About #1 Answer (description): I changed "activities.groups.create.php" at line 50 and "group.list.php" at line 45 (as mentioned previolsy, because both places prints the groups descriptions), but without any effect. Can you please check what is going on? And please look my "group->description" findings in the source in the previous post, because I'm not sure these are the only two places that prints Groups Descriptions.

Regarding #2 Answer: In order to make the Group Name work 100% in the Newsfeed, I also did the following change in "activities.groups.avatar.upload.php" in line 37:

<span><?php echo JText::sprintf('COM_COMMUNITY_CHANGE_GROUP_AVATAR',$groupLink, JText::_($act->appTitle));?></span>

I also find two problems in the Group Name override:

a) When I post something in the group, please look the screenshot below.

Attachment ScreenShot2015-01-07at9.18.12AM.png not found



b) The page title in browser not show the Group Override Name correctly, see the browser's tab in the next screenshot:

Attachment ScreenShot2015-01-07at9.42.24AM.png not found



What is the change I need to do to fix these problems?


We are almost there!

Regards,

Paulo Vaz

Attachments:
10 years 3 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Paulo,

#1 please create new group, I will check in streams, and then please provide me FTP access, so I can check the file directly

a) for this you should edit another file activities.profile.php and find $group->name

b) for title, you need edit this file components/com_community/helpers/head.php, find this varibale $title and add JText::_() on it.

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