Posts from 2015-11-03

Translate Language String in default value of jfield Joomla

Recently I was developing the Magic Scroller Plugin for Virtuemart also called ajax infinite pagination. It requires some html content to be entered by user. So a textarea field is added in plugin manifest file.But it also needs to be prefilled with some html content, so that user can easily understand how to change content. I entered a language string in the default value and saved it as shown below in code

 <field
type="textarea"
name="mscroll_loading_html"
label="PLG_CONTENT_VM_MSCROLL_LOADING_HTML"
description="PLG_CONTENT_VM_MSCROLL_LOADING_HTML_EXPL"
editor="false" rows="3" cols="50"
default="PLG_CONTENT_VM_MSCROLL_LOADING_HTML_VALUE" filter="raw"
 /> 

Now I refreshed the backend , and to my surprise the html content is not there, instead the language string PLG_CONTENT_VM_MSCROLL_LOADING_HTML_VALUE is prefilled there. Label and description attribute of field are sucessfully translated but not the default value.

Continue reading