forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Ecards & Email => Topic started by: Jules on February 19, 2005, 01:24:08 am
-
Hi, when I am not logged in and want to write an ecard (already allowed in the groups config ;)) the name of the ecard-writer is automatically set to "Anonymous". I want to change this into the german word for it (Unbekannt), but I don't know how... I did not find any piece of code in the original coppermine-files containing "Anonymous" in this content. So I think it's a php-funktion to automatically set it ???...
Can anyone of you help me with this???
Thanks Jules
-
hmm... Looking at the code, it seems like it needs to be changed in multiple places. I don't know if it's possible to do this without breaking things. However, it seems to be a good thing to internationalize since it is also hard-coded in the next version. Imagine someone who doesn't know English receiving an ecard from "Anonymous"... they might think it's an actual person's name. Sorry I can't help on this, but hopefully this could be addressed.
-
The constant USER_NAME is set to Anonymous in init.inc.php. Change
define('USER_NAME', 'Anonymous');
to
define('USER_NAME', 'Unbekannt');
I agree, this should be put in the language file.
-
thank you very much for showing up this line of code!
it worked for me.
thanks for this fast reply and thanks for this great gallery script!!!!
jules
-
That is great that it worked for you and thank you for bringing it to our attention.
@dev team, is it too late to internationalize this?
-
I wouldn't think so. Add one line of code to init.inc.php and one line to the language file. I'll make the change and commit if it's ok.
-
Oops, not that easy. I have to look at the devel init.inc.php more closely - I was still thinking 1.3.2.
-
I think Anonymous is returned in functions.inc.php, in the set_username function. This is untested, but should work.
In english.php, add
$lang_anonymous_user = array(
'anon' => 'Anonymous',
);
In functions.inc.php, change
return 'Anonymous';
to
return $lang_anonymous_user['anon'];
Can someone test this? I'm currently without the ability to test the devel version.