Difference between revisions of "Translate Toolbar"

(Created page with "JomSocial fully support multilingual sites and this article will explain how to properly translate the Toolbar navigation ==Wrong Approach== First thing many users will try ...")
 
(Proper Approach)
Line 20: Line 20:
 
[[File:Editmenu2.png]]
 
[[File:Editmenu2.png]]
 
* '''Note:''' - we entered the COM_COMMUNITY_TOOLBAR_PROFILE in that field, only it is not fully visible.
 
* '''Note:''' - we entered the COM_COMMUNITY_TOOLBAR_PROFILE in that field, only it is not fully visible.
Save the menu item and open bot of your language files.<br/>
+
Save the menu item and at the bottom of language files add the proper translation.<br/>
At the very end of both files, now you can add the translation for this menu item
+
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
 
COM_COMMUNITY_TOOLBAR_PROFILE="Our Translation"
 
COM_COMMUNITY_TOOLBAR_PROFILE="Our Translation"

Revision as of 20:33, 24 January 2013

JomSocial fully support multilingual sites and this article will explain how to properly translate the Toolbar navigation

Wrong Approach

First thing many users will try to do is to create another menu in Joomla Menu Manager replicating the JomSocial Toolbar on their respective language. This practice however, is wrong, and it wont work

Proper Approach

Translating Toolbar will involve some modifying of JomSocial language files. If you already have multilingual site, we will assume you know how to manipulate with language files of Joomla and extensions that are installed.
With your favorite code editor, open default JomSocial language file which is ROOT/language/en-GB/en-GB.com_community.ini and open language file for your respective language. It should be this file ROOT/language/xx-YY/xx-YY.com_community.ini where xx-YY is your language code
Scroll to the bottom of both files

Next, go to Joomla Menu Manager and open the JomSocial Toolbar Menu. Select the menu item you want to translate and click on Edit
For this example, we will edit the Profile menu item

Editmenu1.png

In Menu Title option, replace the word Profile with the language key you want to use. You can use basically any key you want but for the sake of uniformed design we will use this schema
COM_COMMUNITY_TOOLBAR_ITEMNAME
Following this schema, we will enter the 'COM_COMMUNITY_TOOLBAR_PROFILE in Menu title as indicated on the picture bellow

Editmenu2.png

  • Note: - we entered the COM_COMMUNITY_TOOLBAR_PROFILE in that field, only it is not fully visible.

Save the menu item and at the bottom of language files add the proper translation.

COM_COMMUNITY_TOOLBAR_PROFILE="Our Translation"


Navigate to the site Front End and you will see your new translation in effect

Toolbartranslated.png