b. Translation Examples

Top  Previous 

 

How to Add a New Value to a “List”-Type Field and Translate It?

 

For example, you want to add a new exterior color.

1. Add a new value to Admin panel ->Listing Configuration -> Listing Types -> edit ExteriorColor -> click on the “Edit List Values” link -> add a new color to the “Add a New List Value” form, for example, “Indigo”

       2. Move this value within the list on the appropriate position

       3. Go to Language Management -> Manage Phrases -> click on the “Add new” link -> fill in the form:

               a. Phrase ID = Indigo

               b. Domain = Property_ExteriorColor

               c. English = Indigo

               d. YourSecondLanguage = The equivalent for the new language

               And click on  the “Save” button.

 

 

How to Add a Field to a Form?

 

For example, you want to add a keyword search to a Quick Search form.

 

1. Go to Admin Panel -> Templates -> Edit templates -> edit “Classifieds Engine” -> edit “quick_search.tpl”

 

2. Add the following lines to where you want to locate this field :

 

               <tr><td align="right">[[FormFieldCaptions!Keywords]]

                    </td>

                    <td>{search property=keywords}

                    </td>

               </tr>

 

“FormFieldCaptions” is the domain (i.e. group of phrases) where “Keywords” belongs to. Square brackets ‘[[‘ and ‘]]’ are opening and closing tags for a phrase that will be translated.

 

 

How to Add a NEW Phrase?

 

For example, you want to have a new field “Age”.

       1. Create a new list-type field in Admin panel ->Listing Configuration -> Listing Types -> edit “Resume” -> click on the “Add a New Listing Field” link -> fill in the “Add a New Listing Field” form:

               a. ID = Age

               b. Caption = Age

               c. Type = list

               d. Required = unchecked

               Click “Add”.

 

       2. Edit a newly created “Age” field there and add values to a list:

               a. 12 - 16

               b. 16 - 21

               c. 21 - 45

               d. 45 >

 

       3. Add the “Age” field to the listing_details.tpl form at Admin Panel -> Templates -> Edit templates -> edit “Classifieds Engine” -> edit “listing_details.tpl”:

 

             <tr><td><b>[[FormFieldCaptions!Age]]:</b> [[$listing.Age]]</td></tr>

 

       4. Go to Admin Panel -> Language Management -> Translate Phrases -> find “Age” phrase:

               a. Phrase ID = Age

               b. Domain = Any

               c. Languages = English

               and click on the “Show”. Translate the phrase by clicking on the “Edit” button and filling in the form.

 

       5. Open the /languages/en.xml file (the language file of the default language) and add the following line after the <pages> tag in order to create a new domain (group of phrases):

 

               <page key="Property_Age"/>

               Now you will be able to add the values to the “Age” phrase (not field!) and translate them.

 

       6. To add and translate the values to the “Age” phrase go to Admin Panel -> Language Management -> Translate Phrases -> click on the “Add New” link - > fill in the “Add a New” form:

 

               a. Phrase ID = Excellent

               b. Domain = Property_Age

               c. English = Excellent

               d. YourSecondLanguage = The translation for this language.

               You need to add all values for the “Age” phrase this way.