Languages and alternative language support ⇒ i18n - l10n (languages) ⇒ How to show registration message in different languages? ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Indexi18n - l10n (languages)

How to show registration message in different languages? Reply to topic


Hi there.

How to change registration message "While the administrators and moderators of this website..." to the language of the user. French users won't read english registration messages Big grin

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.26-2-686 / 5.0.51a-24+lenny1 / 5.2.9-0.dotdeb.2 / CPG 9.2.1


You'll find the English text in the db, cms_config_custom, in a record with cfg_name = member and cfg_fld = registermsg. Open with phpMyAdmin, and step through the file to find it - it should be within the first few pages.

You could either just replace the English text with French text, or if you wanted to display either, create a new record with, say, cfg_field = registermsg_f, and then modify /modules/Your_Account/register.php to display either English or French, by using the correct version of registermsg or registermsg_f depending on the current value of $currentlang.

Note that you will need to add $currentlang as a global in register.php first before you can test it. Also the contents of cms_config_custom are cached, so after you have updated cms_config_custom, you will need to delete the file /cache/config_MAIN_CFG.php in order to force Dragonfly to re-read the changed version.

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


Thank you for your fast feedback - but -

can you explain it for 'dummies'?

I've made the database entries like 'registermsg_fra, registermsg_ger, registermsg_spa' etc. but the other Confused Embarassed
I don't know...

Thanks a lot!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.26-2-686 / 5.0.51a-24+lenny1 / 5.2.9-0.dotdeb.2 / CPG 9.2.1


OK, I'm pushed for time right now - but here's a different suggestion (this is for DF 9.2, if you are really on 8.2 you'll have to guess at the equivalent line numbers, exact line entries, etc):

Add a new line in /language/english/your_account.php at around line 61, or at the end, makes no difference, like so:define('_REGISTRATIONTEXT','. . . put copied text in here . . . ');

Then in module /modules/Your_Account/register.php on line 45: <td><span class="genmed"><br />'.$user_cfg['registermsg'].'<br /><br />'._BOUNDREGISTRATION.'<br /><br /></span><div align="center">

change $user_cfg['registermsg'] to _REGISTRATIONTEXT (ie switch it to read from the language file, like the rest of the page, rather than from the db), e.g: <td><span class="genmed"><br />'._REGISTRATIONTEXT.'<br /><br />'._BOUNDREGISTRATION.'<br /><br /></span><div align="center">

If that works in English, then you should just have to add the same new text line to /language/french/your_account.php, and to every other language translation that you want to support, and it should work.

Sorry I have no time to test this. Please report back if this works for you, as I'm sure others will need it - including me quite possibly in a future project. And post the translations that you have come up with for the benefit of us mono-linguists Wink ?

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


Ohh sorry I've testet on 9.2 (Must edit my profile Wink Thank you very much. I'll try it tomorrow and write a feedback here.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.26-2-686 / 5.0.51a-24+lenny1 / 5.2.9-0.dotdeb.2 / CPG 9.2.1


Ok - I've found a variable that's named 'boundregistration'. I don't need two texts in registration so I decide to take this Wink I don't know the differences but it works good for me. Thank you all.
I'll remove special corp. text and than post it here.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.26-2-686 / 5.0.51a-24+lenny1 / 5.2.9-0.dotdeb.2 / CPG 9.2.1

All times are UTC


Jump to: