Recommend Print

Using Language Keys in Form Fields

  • Categories
  • Profile
    Beginner, Webmaster
  • Since version
  • Tested Version
How to translate fields in VirtueMart forms.

VirtueMart 2 allows you to translate many form fields by adding a language key instead of a single language value. This is possible for all fields, which are usually set up once in the store configuration. Examples for such fields are shopper field names, custom fields, etc.
To give you an idea, how it works, have a look at the following example.

In a multilingual shop you might need to translate the gender-specific salutation (title) in the dropdown selection available in shopper forms - like in the two english/german screenshots below:


In order to achieve this, go to VM Configuration > Shopper Fields > Title and enter the keys like in the following image:


Afterwards add your keys/strings to the en-GB and your language (de-DE in this example) file override files in the folder yourdomain\language\overrides. You may also use the Joomla Extensions > Language Manager > Overrides  to add these lines to your language overrides.




Be aware that the language keys of the plugins even shown in the Frontend (FE) are defined in the Backend (BE). Also the countries are in the BE. Shopperfield and orderfield language keys are in the FE. 

  • Created by
    Joerg Kiekebusch
  • Created
    Friday, 01 March 2013
  • Last modified
    Tuesday, 21 May 2013