Right to left support

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Message
Author
mikedawson
Newbie
Posts: 9
Joined: Sun Oct 25, 2009 12:24 pm
Contact:

Re: Right to left support

#16 Post by mikedawson »

Hey,

Sounds awsome! I see the commit in the branch on Launchpad, so will check that out this evening and post screenshots / feedback. Don't worry about using time to check the results - we can definitely take care of that, we even have some linguists working for us as translators here. I'd definitely be interested in looking at the code behind the text rendering anyway.

Regards,

-Mike

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Right to left support

#17 Post by PyTom »

It's not going to be that simple. I punt the Arabic shaping off to fribidi, so you'll need to grab the latest versions of the Ren'Py dependencies. You can get them from:

https://code.launchpad.net/~renpytom/renpy/renpy-deps

You'll need to recompile everything, using the instructions at:

http://www.renpy.org/wiki/renpy/Other_Platforms

Finally, you'll need to add the code:

Code: Select all

init python:
   config.rtl = True
to a game to enable RTL language support. At this point, Arabic should work, but things will still have a general left-alignment to them. This needs to be adjusted with the style system. Writing:

Code: Select all

init python:
    style.default.xalign = 1.0
    style.default.text_align = 1.0
is probably a good part.

Since the current implementation works by reordering characters, some things may not work. For example, the text speed feature will type things out left-to-right. There isn't a good way to fix that without my rewriting the text rendering system.

Also, I have no idea if text tags will work properly.

That being said, I think that the current level of RTL support is enough to allow one to write a game for the OLPC platform.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

mikedawson
Newbie
Posts: 9
Joined: Sun Oct 25, 2009 12:24 pm
Contact:

Re: Right to left support

#18 Post by mikedawson »

Hi,

Just glanced over that - looks fine though now it's getting a bit late in Kabul and I am pretty knackered....

Will check that out during the day tomorrow - many thanks for the support!

Regards,

-Mike

mikedawson
Newbie
Posts: 9
Joined: Sun Oct 25, 2009 12:24 pm
Contact:

Re: Right to left support

#19 Post by mikedawson »

Hi,

My apologies for this taking so long! Our net connection has been dead the last 4 days which makes life a bit more difficult - I just manage to get online enough to get through mail, etc. Will get to this one ASAP!

Thanks Again!

-Mike

mikedawson
Newbie
Posts: 9
Joined: Sun Oct 25, 2009 12:24 pm
Contact:

Re: Right to left support

#20 Post by mikedawson »

Hey,

My fault for taking so long to dig into it - posted compilation issues but now just downloaded the new release

Works perfectly! Letters join etc. exactly as they should, and it supports mixing RTL script and LTR (e.g. sometimes people put the English words in brackets when the translation is not so well known).

Regards,

-Mike

User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: Right to left support

#21 Post by renoa-heartilly »

Hi *_*
sorry my first post is going to be a question XD but is this possible in the current release (ren'py 6.10.2 ) ?
I'm totally n00b when it comes to programming, so i have no idea how to get the right to left system into my game even after I've read the whole thread @_@
I'm not asking for anything to be done right now XD I'm just hoping you'll consider adding support for Arabic in future updates, or maybe simplify the instructions on how to implement those into current ren'py releases.
thank you very much!

Milad
Newbie
Posts: 3
Joined: Thu Dec 20, 2012 4:30 am
Contact:

Re: Right to left support

#22 Post by Milad »

Hi,
I read topic and I wondering if somebody can help me
I didn't understand what should I do to something for support RTL

Post Reply

Who is online

Users browsing this forum: No registered users