Announcement

Collapse
No announcement yet.

Any Chance for supporting arabic language

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Any Chance for supporting arabic language

    Is there any chance to support Arabic language input in objects ( Input , Grid , combo box , tree , List ) ???
    and not only objects, its important to support save to text file and save grid to csv file in Arabic language ,

    If its not supported and will not be supported , is there an trick to do it ?

    Thanks

  • #2
    Have you tried ?
    Click image for larger version

Name:	Input Properties_ Input1.png
Views:	450
Size:	31.7 KB
ID:	299197

    Comment


    • #3
      Just another sample...

      Click image for larger version

Name:	SCRN-2017-12-07-02.png
Views:	499
Size:	43.9 KB
ID:	299206

      Ulrich

      Comment


      • #4
        That is actually really good to know (all this time, I had no idea)
        Thanks Ulrich, thanks colc.

        Comment


        • #5
          Thank you All for replay
          My problem is to get the Arabic inputs to external text file, i tried everything and it didn't work.
          Even i did choose Arabic language and it worked to be shown in some objects and not for other, like Input object can display it but a grid or a list it didn't work.
          When i save the input to text file it results like this (???? ???? ????).
          I don't know how you get the grids and lists and trees to preview Arabic language (Ulrich), and can you save the inputs of these objects to text or excel files in Arabic ??

          Hope you can help me, its very important to know it can be done or not.

          Comment


          • #6
            Can you help Ulrich ??

            Comment


            • #7
              Hi
              After I changed (Language for non-Unicode Programs) in windows Region Settings to Arabic, i managed to have some objects working,
              the weird thing is that all objects worked inside the program, but when any thing changes or on Undo most of them convert to "Cyrillic" .
              Also on Preview they convert to another language as seen in the picture.

              Hope you can help
              Please help ASAP, dont wait days.

              Comment


              • #8
                Any Help ???? its been 1 week waiting :(
                Consider it a Xmas Gift

                Happy hollydays

                Comment


                • #9
                  Dear all,

                  Is there any follow up on this Arabic support thread?
                  I am developing an application using AMS that supports 22 languages (Western Europe, Eastern Europe, Tuskish, Greek, Russian) in one executable.
                  I need now to add Arabic and hebrew support, which are both RTL languages, so I am very interested to know how these issues were solved.

                  Addtionally, I have a few more questions:
                  1. Where can we find the Autoplay Media Studio language Demo showed by Ulrich in above #3? At least binary, but ideally the source, so that we can learn?
                  2. Because the same code supports both RTL (Arabic/Hebrew) and LTR (other languages), how can the project settings -> Advanced -> Enable right to left reading order option be set correctly for both? Or can this be changed dynamically at run-time?

                  Thanks in advance for your help!

                  Kind Regards,

                  Marc
                  Attached Files

                  Comment


                  • #10
                    Please check your PM.

                    Ulrich

                    Comment


                    • #11
                      is there any thing helpful in PM Ulrich ???
                      I still have some problems with Arabic support. hope u can share you advice to Marc.Morisse with us plz .

                      Comment


                      • #12
                        Thanks Ulrich for the code and binary for Autoplay Media Studio language Demo, but:
                        - I cannot make changes and recompile because of an error with a language.lmd plug in (See attached Photo 1)
                        - The project setting for the Demo is not using the "Enable Right to Left Reading Order" option and as a matter of fact, also not displaying the controls mirrored (see attached Photo 2) as it should (see attached Photo 3)

                        Comment


                        • #13
                          You need to change the alignment / read order of the controls via script. The Language plugin can be found with minimum effort on my web server.

                          Ulrich

                          Comment


                          • #14
                            Originally posted by Marc.Morisse View Post
                            Is there any follow up on this Arabic support thread? ... I need now to add Arabic and hebrew support, which are both RTL languages ...
                            AMS can handle Arabic input, although as far as I'm aware, it can't store the values in UTF-8 format. Ulrich developed an Encoding plugin which can convert Arabic input to UTF-8, thereby acting as a workaround solution. The Encoding plugin can be found on his website at: http://www.mindquake.com.br/software...ns/23-encoding

                            Look also at his Language Actions Plugin which compliments the usefulness of AMS's inbuilt System.GetDefaultLangID () function. And which can be found at: http://www.mindquake.com.br/software...ns/25-language


                            Where can we find the Autoplay Media Studio language Demo showed by Ulrich in above #3? At least binary, but ideally the source, so that we can learn?
                            The Language Demo apz can also be accessed from Ulrich's website. Here's the direct link:http://www.mindquake.com.br/en/examples/multilanguage


                            Because the same code supports both RTL (Arabic/Hebrew) and LTR (other languages), how can the project settings -> Advanced -> Enable right to left reading order option be set correctly for both? Or can this be changed dynamically at run-time?
                            You can dynamically change the ReadOrder of those objects on the page which have a ReadOrder attribute as part of their respective Properties table. (ie. The ListBox, ComboBox, Input, CheckBox, RadioButton and Tree each have an option for ReadOrder in their Properties table).

                            So, by first executing a check at runtime to determine the user's DefaultLangID, you can then employ an if/then statement to dynamically apply the appropriate ReadOrder to each of these objects. To apply a RTL ReadOrder on these objects, you can use the function below by pasting it into Globals (and then calling the function from the Page's On Preload event):

                            Globals:
                            Code:
                            function Right2Left()
                            
                                local function GetWindowLong(hWnd, nIndex)
                                    return tonumber(DLL.CallFunction("User32.dll", "GetWindowLongA", hWnd..", "..nIndex, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL))
                                end
                                
                                local function SetWindowLong(hWnd, nIndex, dwNewLong)
                                    return tonumber(DLL.CallFunction("User32.dll", "SetWindowLongA", hWnd..", "..nIndex..", "..dwNewLong, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL))
                                end
                                
                                local Object_hwnd
                                local ExStyle
                                local Type
                                local WS_EX_LAYOUTRTL = 4194304
                                
                                -- For Window
                                Object_hwnd = Application.GetWndHandle()
                                ExStyle = GetWindowLong(Object_hwnd ,-20)
                                
                                -- SetWindowLong(Object_hwnd, -20, ExStyle + WS_EX_LAYOUTRTL)
                                objects = Page.EnumerateObjects()
                                if objects ~= nil then
                                    Application.SetRedraw(false)
                                    for index, object in pairs(objects) do
                                        Type = Page.GetObjectType(object)
                                    
                                          -- For ComboBox
                                          if Type == OBJECT_COMBOBOX then
                                          Object_hwnd = ComboBox.GetProperties(object).WindowHandle
                                          ExStyle = GetWindowLong(Object_hwnd ,-20)
                                          SetWindowLong(Object_hwnd, -20, ExStyle + WS_EX_LAYOUTRTL)
                                          ComboBox.SetProperties(object, {ReadOrder = READ_RIGHT_TO_LEFT})
                                  
                                          -- For Input
                                          elseif Type == OBJECT_INPUT then
                                          Input.SetProperties(object, {ReadOrder = READ_RIGHT_TO_LEFT, Alignment = ALIGN_RIGHT})
                                  
                                          -- For ListBox
                                          elseif Type == OBJECT_LISTBOX then
                                          Object_hwnd = ListBox.GetProperties(object).WindowHandle
                                          ExStyle = GetWindowLong(Object_hwnd ,-20)
                                          SetWindowLong(Object_hwnd, -20, ExStyle + WS_EX_LAYOUTRTL)
                                          ListBox.SetProperties(object, {ReadOrder = READ_RIGHT_TO_LEFT})
                                  
                                          -- For RadioButton
                                          elseif Type == OBJECT_RADIOBUTTON then
                                          RadioButton.SetProperties(object, {TextAlignment = ALIGN_RIGHT, ReadOrder = READ_RIGHT_TO_LEFT, ButtonAlignment = BTN_ALIGN_RIGHT})
                                  
                                          -- For CheckBox
                                          elseif Type == OBJECT_CHECKBOX then
                                          CheckBox.SetProperties(object, {TextAlignment = ALIGN_RIGHT, ReadOrder = READ_RIGHT_TO_LEFT, ButtonAlignment = BTN_ALIGN_RIGHT})
                                  
                                          -- For Tree
                                          elseif Type == OBJECT_TREE then
                                          Object_hwnd = Tree.GetProperties(object).WindowHandle
                                          ExStyle = GetWindowLong(Object_hwnd ,-20)
                                          SetWindowLong(Object_hwnd, -20, ExStyle + WS_EX_LAYOUTRTL)
                                          Tree.SetProperties(object, {ReadOrder = READ_RIGHT_TO_LEFT})
                                    end
                                end
                                Application.SetRedraw(true)
                                end   
                            end
                            Page On Preload:
                            Code:
                            Right2Left()
                            The Button, Label, and Paragraph objects however, inherit the ReadOrder setting that was initially selected on the Advanced tab of the Project Settings dialog.

                            For clarification, see section on ReadOrder in user manual under:
                            Contents >> Miscellaneous >> Using International Character Sets (Using Right to Left Read Order)​​​​​​​
                            https://www.indigorose.com/webhelp/a...s/Advanced.htm

                            Comment


                            • #15
                              Miss u Bio so much

                              You illustrate it very well.. thanks man

                              Comment

                              Working...
                              X