joomlamailer.com

Change Language in Input Fields

Change Language in Input Fields

Hello.

I'm using the Sign Up Module in my frontpage, and i'm interested in translating the module in full Portuguese language.
I'm able to translate everything in the module with the help of JoomFish! and i've put a new language file in the languages folder called "pt-PT.mod_mailchimpsignup.ini" to help me translate messages and the subscribe button.

The only thing left to translate are the three input fields: "Email Address", "First Name" and "Last Name".
I need to have these translated according to the JoomFish language selection.

Can anyone help me out with this?
Thank You.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Change Language in Input Fields

Hello Alves,

These field labels are pulled directly from MailChimp. You can change them by logging into mailchimp.com then go to lists and click settings - fields and merge tags. There you can change the labels. Once you change thos labels you must open the signup module configuration in your Joomla site and select the fields again, which you want to be displayed!

To translate those labels you would have to edit the file: /modules/mod_mailchimpsignup/tmpl/default.php
At line 259 replace $title with:  JText::_($title)
Then you can add the original title to the language file like: 
ORIGINAL TITLE IN CAPITAL LETTERS="Translation"

We would be interested in the Portuguese language file to include it in the module! Please send it to contact@freakedout.de if you don't mind. Thank you!

Kind regards,
Pete

If you are satisfied with our product please write a review in the Joomla Extensions Directory!

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Change Language in Input Fields

Hello Pete!

Of course, i'll be more than happy to give you the file with the translation, but first i have to make sure it works for the input field labels, and here's the problem...

You told me to change the following line of code:

"At line 259 replace $title with:  JText::_($title) "

But at line 259 of my "default.php" file i get only: "break;"

I did a code search on my php file, and i'll show you where i found "$title":

LINE 220: $title = $field[2];
LINE 221: if($field[3]){ $title = $title.' *'; }
LINE 240: $title = $field[2];
LINE 280: $attributes = array('maxlength'=>'10','readonly' => 'readonly', 'style' => 'width:85%;', 'title' => $title);

I've tried to change this in some of these lines but it didn't work. In which ones should i replace the code?

I'm maintaing the Mailchimp tags, these being EMAIL, FNAME and LNAME, and i'm using them on the language file to translate.  ex: FNAME=text

So far it's not working…any clues how i can fix this with this new information?
------------------------------------------------------------------
EDIT: I'm using the latest version of joomla mailchimp integration component and signup module. Version 1.6.1.
I would appreciate a quick answer to this if possible...I'm trying to solve this before i can officially launch the website i'm working on.

Thank You!

Edited by: Alves - 21-Apr-2011 23:21:37

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Change Language in Input Fields

Hello Alves,

Please upgrade joomlamailer to version 1.7. The JText function has been added to all labels in the signup module. If you add your translations to the language file as I described in post #2 they should be applied.

Kind regards,
Pete

If you are satisfied with our product please write a review in the Joomla Extensions Directory!

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Change Language in Input Fields

Hi There,

Can you update this answer for Joomla 3+? The line numbers and code no longer correspond to the template file. I am also looking for a way to internationalize the placeholder values in the input fields without creating multiple fields labelled in multiple languages.

Administrator has disabled public posting. Please login or register in order to proceed.