Hi,

Is there a ready made possibility to translate the agreement, button value and title?

If no, i'd like to request a help about how to implement this.

thanks

Comments

carvalhar’s picture

I had to edit agreement.module at function agreement_form (line 406).

I changed these two lines to include t() (and then translate them using localized strings):
'#title' => check_plain(variable_get('agreement_checkbox_text', AGREEMENT_CHECKBOX_TEXT)),
to
'#title' => check_plain(t(variable_get('agreement_checkbox_text', AGREEMENT_CHECKBOX_TEXT))),
and for the button:
'#value' => check_plain(variable_get('agreement_submit_text', AGREEMENT_SUBMIT_TEXT)),
to
'#value' => check_plain(t(variable_get('agreement_submit_text', AGREEMENT_SUBMIT_TEXT))),

I could do the same for Agreement Text, but i don't like the idea to use t() function.
This text will always be a big text and mainly, it can change only with one language.
If i use t(), the bond would broke if the original language text change but the translated text don't.

I think that this agreement text should be a node, and then translated for many languages but I'm not sure how to set a node for this.

The agreement text is loaded at function agreement_page:
$text = check_markup(variable_get('agreement_text', ''), variable_get('agreement_format', AGREEMENT_FORMAT), FALSE);

Any help about how to solve this?

thanks

pagaille’s picture

Status: Active » Closed (fixed)

I don't know how this issue slipped through the cracks - I apologize for the extremely delayed response! All of those values are run through the translation function and have been since rc1.