I was discussing this late at night on Discord, so may have had strange ideas. I will try to explain my confusion with the images.
If you type Arabic text, using google translation for example, this is how the text appears:
In English this sais "I love beaches. The water is warm."
Notice there are 2 sentences. Not only the words & letters inside a sentence are revertse R->L, but also sentences themselves are reverse R->L.
Now, if I put this full text into the AGS script as-is, it will look like this:
Is this how it's supposed to be in script and translation file?
OR, should we require the sentence in the L->R order, and only text R->L? Like:
Now, let's assume that there are paragraphs in this string.
In English this sais: "I love beaches. The water is warm. \n The sun is high. \n"
How do we treat these sections separated by \n? In R->L or L->R order?
In regards to the line-splitting and text wrapping. If everything is treated R->L (sentences are R->L and paragraphs are R->L), then we basically just need to have a reverse splitting algorithm, that is: run the string from back to front and split like that.
That's the easiest solution.
After this there will still be a logical problem of string concatenation, e.g.:
This will be displayed in a wrong order on screen.
But I guess we cannot do anything about it, unless we introduce a R->L aware "String.Concatenate" function?
If you type Arabic text, using google translation for example, this is how the text appears:
In English this sais "I love beaches. The water is warm."
Notice there are 2 sentences. Not only the words & letters inside a sentence are revertse R->L, but also sentences themselves are reverse R->L.
Now, if I put this full text into the AGS script as-is, it will look like this:
Is this how it's supposed to be in script and translation file?
OR, should we require the sentence in the L->R order, and only text R->L? Like:
Now, let's assume that there are paragraphs in this string.
In English this sais: "I love beaches. The water is warm. \n The sun is high. \n"
How do we treat these sections separated by \n? In R->L or L->R order?
In regards to the line-splitting and text wrapping. If everything is treated R->L (sentences are R->L and paragraphs are R->L), then we basically just need to have a reverse splitting algorithm, that is: run the string from back to front and split like that.
That's the easiest solution.
After this there will still be a logical problem of string concatenation, e.g.:
This will be displayed in a wrong order on screen.
But I guess we cannot do anything about it, unless we introduce a R->L aware "String.Concatenate" function?