Re: arabic language
Posted by
Hugo <Nabble> on
Apr 09, 2013; 9:12pm
URL: https://support.nabble.com/arabic-language-tp7581259p7583949.html
akhayyat wrote
>> 1. What are all the possible values of the "app" variable?
> That's right: Gallery, Category and Subcategory.
So there are no "Mailing list" or "Forum" apps? Only those three above?
As far as I remember, the possible values are: Forum, Gallery, Newspaper, Blog, Category, Board, Mixed and Subcategory. You should check which ones are masculine and feminine in order to build the right macros for your translation.
akhayyat wrote
> You can create another macro to handle "the app".
Is there a simple macro for testing string equality? or is it just "regex_matches"?
Better yet, is there a switch-case-like macro?
Here is what I'm thinking:
<macro name="the" dot_marameter="app">
<n.if.regex_matches text="[n.app/]" pattern="منتدى"/> // forum
<then>المنتدى</then>
<else.if.regex_matches text="[n.app/]" pattern="فئة"/> // category
<then>الفئة</then>
<else.if.regex_matches text="[n.app/]" pattern="فئة فرعية"/> // subcategory
<then>الفئة الفرعية</then>
<else.if.regex_matches text="[n.app/]" pattern="معرض صور"/> // gallery
<then>معرض الصور</then>
1. How should I close the <else.if.regex_matches> tags?
</else.if.regex_matches>
OR
</else.if.regex_matches text="[n.app/]" pattern="فئة"/>
2. Is there a better way to do this switch-case-type logic?
You can use a switch-case like this:
<macro name="the" dot_parameter="app">
<n.switch. value="[n.app/]">
<n.case. value="forum">منتدى</n.case.>
<n.case. value="category">فئة</n.case.>
<n.case. value="subcategory">فئة فرعية</n.case.>
...
</n.switch.>
</macro>
If you want simple string comparison, you can use:
<n.if.equal value1="[n.app]" value2="forum">
<then>...</then>
</n.if.equal>