Difference between revisions of "Translate Elements"

(Translating Method)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Overview==
 
==Overview==
This tutorial will cover the method of translating every JomSocial Element such are [[Custom Profile Fields]], Groups, Video and Event Categories. In other words, every element that can be found in across JomSocial's configuration.<br/>
+
This tutorial will cover the method of translating every JomSocial Element such are [[Custom Profile Fields]], Groups, Video and Event Categories. In other words, every element that can be found in across JomSocial's configuration.
Translating Elements 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
+
  
 
===Translating Method===
 
===Translating Method===
 
For this tutorial, we will translate [[Custom Profile Fields]] but you can apply same method to video, group and event categories, as well as Toolbar which is covered in [[Translate Toolbar|other tutorial]]<br/>
 
For this tutorial, we will translate [[Custom Profile Fields]] but you can apply same method to video, group and event categories, as well as Toolbar which is covered in [[Translate Toolbar|other tutorial]]<br/>
 
Navigate to the site backend and from Components dropdown menu select JomSocial -> Custom Profiles<br/>
 
Navigate to the site backend and from Components dropdown menu select JomSocial -> Custom Profiles<br/>
[[File:Jsmenucustomprofiles.png]]
+
 
 +
[[File:custom-profile.jpeg]]
  
 
In the page that opens click on the field you want to translate. For this tutorial, we will translate '''Gender''' field
 
In the page that opens click on the field you want to translate. For this tutorial, we will translate '''Gender''' field
  
[[File:Customprofilegenderdefault.png]]
 
  
 
Replace the '''Name''' of the field with a 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
 
Replace the '''Name''' of the field with a 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
Line 18: Line 15:
 
Following this schema, we will enter the COM_COMMUNITY_FIELDS_GENDER in '''Name''' field as indicated on the picture bellow
 
Following this schema, we will enter the COM_COMMUNITY_FIELDS_GENDER in '''Name''' field as indicated on the picture bellow
  
[[File:Customprofilegender1.png]]
+
[[File:profile-edit-fields.jpeg]]
 
* '''Note''' - we entered the COM_COMMUNITY_FIELDS_GENDER in that field, only it is not fully visible.  
 
* '''Note''' - we entered the COM_COMMUNITY_FIELDS_GENDER in that field, only it is not fully visible.  
 
Save the field.
 
Save the field.
Line 24: Line 21:
 
Now browse to Backend -> Extensions -> Langauge manager. Click "overrides".
 
Now browse to Backend -> Extensions -> Langauge manager. Click "overrides".
  
[[File:Nowe-lang1.png]]
+
[[File:translate-custom-profile-fields.jpeg]]
  
 
Choose from dropdown list for which language you want to add new translation and click "New" button.
 
Choose from dropdown list for which language you want to add new translation and click "New" button.
Line 46: Line 43:
 
===Limitation===
 
===Limitation===
 
Some limitation applies. You cant translate Multiprofiles names and descriptions. Everything else is translatable using this method
 
Some limitation applies. You cant translate Multiprofiles names and descriptions. Everything else is translatable using this method
 +
 +
==See Also==
 +
* [[Translate Toolbar]]
 +
* [[Changing Single Sentence or Word]]

Latest revision as of 03:54, 20 June 2018

Overview

This tutorial will cover the method of translating every JomSocial Element such are Custom Profile Fields, Groups, Video and Event Categories. In other words, every element that can be found in across JomSocial's configuration.

Translating Method

For this tutorial, we will translate Custom Profile Fields but you can apply same method to video, group and event categories, as well as Toolbar which is covered in other tutorial
Navigate to the site backend and from Components dropdown menu select JomSocial -> Custom Profiles

Custom-profile.jpeg

In the page that opens click on the field you want to translate. For this tutorial, we will translate Gender field


Replace the Name of the field with a 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_FIELDS_ITEMNAME
Following this schema, we will enter the COM_COMMUNITY_FIELDS_GENDER in Name field as indicated on the picture bellow

Profile-edit-fields.jpeg

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

Save the field.

Now browse to Backend -> Extensions -> Langauge manager. Click "overrides".

Translate-custom-profile-fields.jpeg

Choose from dropdown list for which language you want to add new translation and click "New" button.

Nowe-lang2.png

Add COM_COMMUNITY_FIELDS_GENDER to "Language Constant" field and "Our Translation" to "text" field. Click "Save & Close".

Nowe-lang3.png

Your change should be saved and language override list will be displayed:

Nowe-lang4.png

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

Fieldtranslated.png

using the same method, you can translate the field tooltips, field options, as well as video, group and event categories and descriptions.

Limitation

Some limitation applies. You cant translate Multiprofiles names and descriptions. Everything else is translatable using this method

See Also