Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 06:27 pm EDT

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!
 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";

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
 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.
 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
 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?
 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? Confused

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
 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. Smile

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!
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
It was uploaded.
I hope to see it used in Geeklog 1.3.12!
 Quote

All times are EDT. The time is now 06:27 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