Register.php - language specific text not correctly invoked Register.php - language specific text not correctly invoked
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Register.php - language specific text not correctly invoked

Started by su_ict, May 15, 2007, 11:11:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

su_ict

Hi - i have a problem with language specific variables in a part of register.php .

See following lines in register.php :


if ($CONFIG['reg_notify_admin_email']) {

                        // get default language in which to inform the admin
                        $lang_register_php_def = cpg_get_default_lang_var('lang_register_php');
                        $lang_register_approve_email_def = cpg_get_default_lang_var('lang_register_approve_email');


$lang_register_php_def is then used in following lines :


   cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_request_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_approve_email_def, $template_vars)));
                                        } else {
                                                        cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_register_php_def['notify_admin_email_body'], $user_name));
                }


This does not result in inserting the correct language specific notify_admin_request_email_subject and notify_admin_email_body from my language file (dutch.php) - instead it switches to English.

I could not find a setting which specificies in which language the Administrator should be contacted - i assume it should be the language setting of the Coppermine Gallery used.

I modified register.php :

1. deleted the lines setting the *_def variables
2. just used the $lang_register_php instead - delivers correctly the dutch translation.


Joachim Müller

This is indeed a known issue: the emails being sent by Coppermine do not take into account the language preferences by particular users. This may result in emails being sent in a language that the end user doesn't use/understand. A fix is scheduled for future versions, but it's not that easy to accomplish, since user language preferences will have to be stored in the database, which will result in issues when bridging. I'm not sure about the workaround you suggested, but if this works for you, then fine.

Joachim

su_ict

Quote from: GauGau
This is indeed a known issue: the emails being sent by Coppermine do not take into account the language preferences by particular users. This may result in emails being sent in a language that the end user doesn't use/understand. A fix is scheduled for future versions, but it's not that easy to accomplish, since user language preferences will have to be stored in the database, which will result in issues when bridging.
Joachim
Thx Joachim, the particular section i am refering to is only used, at my site, for registering users into the gallery - since the default language of the gallery is set to Dutch by admin and all users are dutch(ies) i can live with the fact that the sentences used in email are translated to dutch - even more so = i want it to be this way so this workaround is ok by me.
Grtz.

Joachim Müller

Just delete all files inside the lang folder except dutch.php and you should be fine.

su_ict

Quote from: GauGau on May 20, 2007, 07:53:55 PM
Just delete all files inside the lang folder except dutch.php and you should be fine.

Yep - i know  8)
I just keep it as i stated before - suites my needs perfectly.

Feel free to set this to solved  ;)

Tharkon

Hi,

I had a similar problem and just wanted to say that this worked for me.

I've also tested it with different languages, and it appears that this tweak will actually cause the "known issue".

Without this tweak all e-mails were in German, and with it they are in the language of the user.

But since like su_ict, I only use Dutch, this won't be a problem for me.