Jump to content

Field name translations for modules


maffmi

Recommended Posts

Hello,

I've just started developing a module for Prestashop 1.5.

My module adds pages in the back office which uses forms.

The forms are working fine, but I have a problem with the displayed field names in default error messages ('The field <name> is required' and such).

Since it uses the input name instead of the input label as the field name by default, they sometimes aren't very meaningful for the end user.

I found out they can be translated using the translation tool, still there doesn't seem to be a way to supply them with a module.

 

 

Is there any way to alter the field names programmatically or supplying a field name translation file with a module?

 

 

Help would be greatly appreciated.

Edited by maffmi (see edit history)
Link to comment
Share on other sites

What you should do is translate it yourself from the Translation module, then select modules.

 

Once you place your module (previously installed, of course) you will appear tags.

 

Remember also that your texts must be enabled to be translated. Example ...

 

<p style="margin-top:20px;">

- {Ls = 'The total amount of your order is' mod = 'bankwire'}

<span id="amount" class="price"> displayPrice price = $ {total} </ span>

{if $ use_taxes == 1}

{l s = '(tax incl.)' mod = 'bankwire'}

{/ if}

</ p>

 

Note that in the part that says {ls = 'The full ...... '} You will see that you can change it from the back office, and also lets you export it in case you want to reuse a module in another store.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...