Welcome, Guest

Translating Validation Script Messages
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Translating Validation Script Messages

Translating Validation Script Messages 2 years, 6 months ago #7777

Does anyone have an idea on how to translate the validation script messages?
I am using Breezing Forms and I have 2 languages on my site. All the labels and radio buttons and options of drop-down lists can be translated using Joomfish, but I am unable to figure out how to translate the validation messages.

Any guidance would be appreciated.
pic.jpg
  • rashad
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0

Re:Translating Validation Script Messages 2 years, 6 months ago #7783

Hi,

the messages should be translatable as well. Let me check the joomfish plugin since I must fix something there anyway.
  • TheMuffinMan
Last Edit: 2 years, 6 months ago by .

Re:Translating Validation Script Messages 2 years, 6 months ago #7797

thanks for your quick reply. i guess that if it is translatable in joomfish, it would have appeared under the 'Label:Data' but it is not appearing.
  • rashad
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0

Re:Translating Validation Script Messages 2 years, 5 months ago #8019

The most simple way is to make a copy of the whole form and translate.. then in Joom!Fish make the second language link to the new translated form!
  • umekolle
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Karma: 0

Re:Translating Validation Script Messages 2 years, 5 months ago #8051

If the only solution to this is by creating another form, then the availability of translation for Breezing Forms in Joomfish is useless
  • rashad
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0

Re:Translating Validation Script Messages 2 years, 5 months ago #8318

I've been hung up on this for a while, too. I finally figured it out. It's so simple it's not even funny. All you have to do is use php code in the message field and call JTEXT to pass along a language tag.

example:

<?php return JTEXT::_('MY_MESSAGE_TEXT'); ?>

You then have to add your message to an existing language file (preferably one that's already loaded) or create and load your own. You can load a language file in the before form piece like this:

JFactory::getLanguage()->load('my_lang_file');

Next create the appropriate files in the language directories. For this example, I would need files such as these:

/language/en-GB/en-GB.my_lang_file.ini
/language/fr-FR/fr-FR.my_lang_file.ini
/language/es-ES/es-ES.my_lang_file.ini

etc.

Hope that helps!!
Greg
  • glwright
  • OFFLINE
  • Junior Boarder
  • Posts: 22
  • Karma: 0
  • Page:
  • 1
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.42 seconds

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany