Difference between revisions of "How to translate text and textfields with Joomfish"
(Created page with 'In JReviews text fields and textrea fields have to be added to a file to get to be known to Joomfish. === 1. How to make listing fields (text, textarea) translatable === The r…') |
|||
Line 11: | Line 11: | ||
Create a new file named "jreviews_content.xml" with the following code: | Create a new file named "jreviews_content.xml" with the following code: | ||
− | <source lang=" | + | <source lang="xml"> |
<?xml version="1.0" ?> | <?xml version="1.0" ?> | ||
<joomfish type="contentelement"> | <joomfish type="contentelement"> | ||
Line 29: | Line 29: | ||
</joomfish> | </joomfish> | ||
</source> | </source> | ||
+ | |||
+ | |||
+ | For every text field you have to create another line like this: | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <field type="text" name="Field Name" translate="1">Title</field> | ||
+ | </source> | ||
+ | |||
+ | |||
+ | Field Name: Text in jReviews -> Field Manager -> Field Name | ||
+ | Title: Text in jReviews -> Field Manager -> Title | ||
+ | |||
+ | |||
+ | |||
+ | === 2. How to make review fields (text, textarea) translatable === | ||
+ | |||
+ | The red cornered field should be made translatable. There is one textfield. | ||
+ | |||
+ | [[File:Joomfish2.jpg]] | ||
+ | |||
+ | |||
+ | |||
+ | Create a new file named "jreviews_review_fields.xml" with the following code | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <?xml version="1.0" ?> | ||
+ | <joomfish type="contentelement"> | ||
+ | <name>jReviews Review Fields</name> | ||
+ | <author>Thorsten</author> | ||
+ | <version>1.0</version> | ||
+ | <description>Definition for JReviews custom field content</description> | ||
+ | <reference> | ||
+ | <table name="jreviews_review_fields"> | ||
+ | <field type="referenceid" name="reviewid" translate="0">ID</field> | ||
+ | <field type="titletext" name="reviewid" translate="1">ID</field> | ||
+ | <field type="text" name="jr_reviewfield" translate="1">Review Field1</field> | ||
+ | |||
+ | </table> | ||
+ | </reference> | ||
+ | </joomfish> | ||
+ | </source> | ||
+ | |||
+ | |||
+ | For every text field you have to create another line like this: | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <field type="text" name="Field Name" translate="1">Title</field> | ||
+ | </source> | ||
+ | |||
+ | |||
+ | Field Name: Text in JReviews -> Field Manager -> Field Name | ||
+ | Title: Text in JReviews -> Field Manager -> Title | ||
+ | |||
+ | Upload the 2 files to administrator/components/com_joomfish/contentelements | ||
+ | |||
+ | Here a screenshot from Joomfish menu with the 2 new menu items for the custom fields: | ||
+ | |||
+ | |||
+ | [[File:Joomfish3.jpg]] | ||
+ | |||
+ | |||
+ | [[Category:JReviews]] | ||
+ | [[Category:Joomfish]] | ||
+ | [[Category:Translation]] |
Revision as of 19:29, 11 January 2010
In JReviews text fields and textrea fields have to be added to a file to get to be known to Joomfish.
1. How to make listing fields (text, textarea) translatable
The red cornered fields should be made translatable. There are 2 textfields and one textarea.
Create a new file named "jreviews_content.xml" with the following code:
<?xml version="1.0" ?> <joomfish type="contentelement"> <name>jReviews Content</name> <author>Thorsten</author> <version>1.0</version> <description>Definition for JReviews custom field content</description> <reference> <table name="jreviews_content"> <field type="referenceid" name="contentid" translate="0">ID</field> <field type="titletext" name="contentid" translate="1">ID</field> <field type="text" name="jr_name" translate="1">Name</field> <field type="text" name="jr_hersteller" translate="1">Hersteller</field> <field type="textarea" name="jr_herstellerdescription" translate="1">Herstellerbeschreibung</field> </table> </reference> </joomfish>
For every text field you have to create another line like this:
<field type="text" name="Field Name" translate="1">Title</field>
Field Name: Text in jReviews -> Field Manager -> Field Name
Title: Text in jReviews -> Field Manager -> Title
2. How to make review fields (text, textarea) translatable
The red cornered field should be made translatable. There is one textfield.
Create a new file named "jreviews_review_fields.xml" with the following code
<?xml version="1.0" ?> <joomfish type="contentelement"> <name>jReviews Review Fields</name> <author>Thorsten</author> <version>1.0</version> <description>Definition for JReviews custom field content</description> <reference> <table name="jreviews_review_fields"> <field type="referenceid" name="reviewid" translate="0">ID</field> <field type="titletext" name="reviewid" translate="1">ID</field> <field type="text" name="jr_reviewfield" translate="1">Review Field1</field> </table> </reference> </joomfish>
For every text field you have to create another line like this:
<field type="text" name="Field Name" translate="1">Title</field>
Field Name: Text in JReviews -> Field Manager -> Field Name
Title: Text in JReviews -> Field Manager -> Title
Upload the 2 files to administrator/components/com_joomfish/contentelements
Here a screenshot from Joomfish menu with the 2 new menu items for the custom fields: