Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 04:40 pm EST
Geeklog Forums
Right to left languages in reg e-mail
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
When the user gets his/her password by e-mail and the e-mail is in a right to left language, it gets all messed up.
You get something to the effect of:
To be able to use it, you must (the site's name) Your account has been...
steveo: user
guest: password
(Well, not in English, of course...)
And when the user/password also contains numbers, it's even worse, for example:
77password:bla (when the password is "77bla")...
In addition, the e-mail's subject gets all messed up, but that's not a RTL issue - it's an UTF-8 issue that can be fixed.
Anyway, there are 2 alternatives for the RTL issue:
1) Use HTML in the e-mail and have "body dir=rtl" (or rather "body dir=3drtl", which Outlook (and other clients?) expects).
That's the best solution, but it's complicated. It may be easier to just leave the parameters that are sent over e-mail in English and make sure there'd be new line breaks before and after the site's name.
2) Every [RTL language].php file (well, at least the ones your site needs...) should leave $LANG04[2], $LANG04[4] & $LANG04[5] in English.
And also have this change:
$LANG04 = array(
...
15 => "Foo[n]{$_CONF['site_name']}[n]bar
(note: I use [n] to signal slash-n due to the restraints here...)
P.S.
Speaking of foreign languages, hebrew.php has embarrasing spelling mistakes. Can I fix them and submit the new file somehow into the next version (I don't want to either keep my old file or mix it with the new one each time a new version comes out!)?
Thanks!
You get something to the effect of:
To be able to use it, you must (the site's name) Your account has been...
steveo: user
guest: password
(Well, not in English, of course...)
And when the user/password also contains numbers, it's even worse, for example:
77password:bla (when the password is "77bla")...
In addition, the e-mail's subject gets all messed up, but that's not a RTL issue - it's an UTF-8 issue that can be fixed.
Anyway, there are 2 alternatives for the RTL issue:
1) Use HTML in the e-mail and have "body dir=rtl" (or rather "body dir=3drtl", which Outlook (and other clients?) expects).
That's the best solution, but it's complicated. It may be easier to just leave the parameters that are sent over e-mail in English and make sure there'd be new line breaks before and after the site's name.
2) Every [RTL language].php file (well, at least the ones your site needs...) should leave $LANG04[2], $LANG04[4] & $LANG04[5] in English.
And also have this change:
$LANG04 = array(
...
15 => "Foo[n]{$_CONF['site_name']}[n]bar
(note: I use [n] to signal slash-n due to the restraints here...)
P.S.
Speaking of foreign languages, hebrew.php has embarrasing spelling mistakes. Can I fix them and submit the new file somehow into the next version (I don't want to either keep my old file or mix it with the new one each time a new version comes out!)?
Thanks!
21
12
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC: $mailtext .= $LANG04[2] . ":[n]$usernamen";
$mailtext .= $LANG04[4] . ":[n] $passwdnn";
$mailtext .= $LANG04[4] . ":[n] $passwdnn";
I have to admit that up to this moment, it has never occured to me that this could be a problem.
I guess the solution would be to use printf-like formatted strings everywhere, instead of concatenating them. So if the text in the language file were something like
'Username: %s'
you could easily move the "%s" to the left side of the string for rtl languages. But then again this could be a problem when you have 2 "%s" in a string - which one is which then?
This may actually be a detail that may or may not have been overlooked in the design for GL2. If you're on the geeklog-devtalk mailing list, you should post something about this there.
Quote by LWC: Speaking of foreign languages, hebrew.php has embarrasing spelling mistakes. Can I fix them and submit the new file somehow into the next version
Sure, send them in. You are aware of the geeklog-translations mailing list?
bye, Dirk
13
17
Quote
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
Well, until a real solution comes up, what do you think about the 3 line breaks?
That way, even in RTL languages you'll get:
Your account has been created in
(the site's name)
To be able to use it, you must...
user:
steveo
password:
guest
BTW, you've never asked how come I have no troubles with RTL languages in the site itself. Geeklog can't handle it either! That's because I declared a new parameter called $lang_direction = " dir=rtl"; (only in RTL languages' files).
I've submitted a patch for this if you want more info.
This also shows you how much "dir=rtl" fixes everything. But when it comes to e-mail, you must send HTML e-mail in order to use it.
[quote Dirk]
Sure, send them in. You are aware of the geeklog-translations mailing list?
[/quote]
Do I have to register there to be able to send it over?
Also, is there anyone else working on this file at this moment? It wouldn't be smart to do parallel work.
That way, even in RTL languages you'll get:
Your account has been created in
(the site's name)
To be able to use it, you must...
user:
steveo
password:
guest
BTW, you've never asked how come I have no troubles with RTL languages in the site itself. Geeklog can't handle it either! That's because I declared a new parameter called $lang_direction = " dir=rtl"; (only in RTL languages' files).
I've submitted a patch for this if you want more info.
This also shows you how much "dir=rtl" fixes everything. But when it comes to e-mail, you must send HTML e-mail in order to use it.
[quote Dirk]
Sure, send them in. You are aware of the geeklog-translations mailing list?
[/quote]
Do I have to register there to be able to send it over?
Also, is there anyone else working on this file at this moment? It wouldn't be smart to do parallel work.
16
21
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC: BTW, you've never asked how come I have no troubles with RTL languages in the site itself.
That's because I've seen a Hebrew Geeklog site before and it had dir="rtl" hard-coded in its header.thtml ...
Quote by LWC: Do I have to register there to be able to send it over?
All the mailing lists require registration. If you don't want to do that, you can always upload the file here (zipped or gzipped, please!).
Quote by LWC: Also, is there anyone else working on this file at this moment? It wouldn't be smart to do parallel work.
I don't think so, but you could simply ask the author - his email address is in the language file ...
bye, Dirk
15
17
Quote
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
[QUOTE Dirk]
you can always upload the file here (zipped or gzipped, please!).
[/quote]
Upload where? To filemgmt? It'd be lost there. How would it get in the next version? Will you just remember this post?
So is there a chance either $lang_direction or line breaked e-mail (before the three always English words) would make it in the next version?
you can always upload the file here (zipped or gzipped, please!).
[/quote]
Upload where? To filemgmt? It'd be lost there. How would it get in the next version? Will you just remember this post?
So is there a chance either $lang_direction or line breaked e-mail (before the three always English words) would make it in the next version?
18
14
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC: Upload where? To filemgmt? It'd be lost there. How would it get in the next version? Will you just remember this post?
Why would I suggest it otherwise?
Quote by LWC: So is there a chance either $lang_direction or line breaked e-mail (before the three always English words) would make it in the next version?
I did actually think about adding the direction to the language files before but figured that people running a site in an rtl language could always hard-code it in header.thtml. But if it helps, we can easly do that (submit a Feature Request, as a reminder).
Changing existing text in the language files is something I'd like to avoid, as it's always causing problems with unsupported language files ...
bye, Dirk
13
16
Quote
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
Why don't you hard code "dir=rtl"? Your site can be seen in Hebrew too. Each Geeklog site can (if its admin allows visitors to change languages). And indeed your site looks reversed in Hebrew.
Another problem is that English users get Hebrew e-mail (unless I add them myself via "batch add" when I'm in English - apparently the e-mail is affected by the admin's own language!).
I'll report once hebrew.php is uploaded.
Thanks!
Another problem is that English users get Hebrew e-mail (unless I add them myself via "batch add" when I'm in English - apparently the e-mail is affected by the admin's own language!).
I'll report once hebrew.php is uploaded.
Thanks!
16
16
Quote
All times are EST. The time is now 04:40 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content