Page 1 of 3 123 LastLast
Results 1 to 15 of 32
  1. #1
    DC CS is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Jan 2023
    Location
    Vaalpark, South Africa
    Posts
    84

    Entering text in a diiferent language

    Good day,


    I have somewhat of a unique request from one of my customers:

    The database contains mainly questions and answers with regards to a huge area of training. All the questions and answers are in english.

    The customer has now requested that when they enter the questions (only the questions, not the answers), they must be able to enter the text in English as well as in Arabic. I have downloaded and installed the Arabic language, but apparently it is not that simple. There is no affect even when I change the "Numeral Shapes" of the textbox to Arabic.
    I am running Windows 11 Version 22H2 (The Windows 11 Home Single Language operating system...) - I suspect this "Single Language..." has something to do with it. Running MS Access 365.

    Can someone assist in this regard? What do I need to do to achieve this?

    Thank you.

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    Not sure if it will work but you could try translation on the fly through google translate. I dont have arabic and it didnt work for me in arabic but you could try. Works in most of the other languages.
    The language code for arabic is "ar"

    Code:
    Public Function GTranslate(strInput As String, strFromLang As String, strToLang As String) As String
    
    
        Dim strURL As String, objHTTP As Object, objHTML As Object, objDivs As Object, objDiv As Variant
        
        strURL = "https://translate.google.com/m?hl=" & strFromLang & _
            "&sl=" & strFromLang & _
            "&tl=" & strToLang & _
            "&ie=UTF-8&prev=_m&q=" & strInput
            
        Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
        objHTTP.Open "GET", strURL, False
        objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
        objHTTP.Send ""
        
        Set objHTML = CreateObject("htmlfile")
        With objHTML
            .Open
            .Write objHTTP.responseText
            .Close
        End With
        
        Set objDivs = objHTML.getElementsByTagName("div")
        For Each objDiv In objDivs
            'If objDiv.className = "t0" Then              'it does not work, anymore
            If objDiv.className = "result-container" Then 'adapted on December 28th
                GTranslate = objDiv.innerText: Exit For
            End If
        Next objDiv
        
        Set objHTML = Nothing: Set objHTTP = Nothing
        
    End Function
    
    
    
    Sub testTranslateG()
     'MsgBox GTranslate("Este es un libro", "auto", "en")
      Dim x As String
      x = "the dog is barking"
      MsgBox GTranslate(x, "en", "es")
      
    End Sub


    Code:
    language codes
    
    Amharic    am
    Arabic    ar
    Basque    eu
    Bengali    bn
    English (UK)    en-GB
    Portuguese (Brazil)    pt-BR
    Bulgarian    bg
    Catalan    ca
    Cherokee    chr
    Croatian    hr
    Czech    cs
    Danish    da
    Dutch    nl
    English (US)    en
    Estonian    et
    Filipino    fil
    Finnish    fi
    French    fr
    German    de
    Greek    el
    Gujarati    gu
    Hebrew    iw
    Hindi    hi
    Hungarian    hu
    Icelandic    is
    Indonesian    id
    Italian    it
    Japanese    ja
    Kannada    kn
    Korean    ko
    Latvian    lv
    Lithuanian    lt
    Malay    ms
    Malayalam    ml
    Marathi    mr
    Norwegian    no
    Polish    pl
    Portuguese (Portugal)    pt-PT
    Romanian    ro
    Russian    ru
    Serbian    sr
    Chinese (PRC)    zh-CN
    Slovak    sk
    Slovenian    sl
    Spanish    es
    Swahili    sw
    Swedish    sv
    Tamil    ta
    Telugu    te
    Thai    th
    Chinese (Taiwan)    zh-TW
    Turkish    tr
    Urdu    ur
    Ukrainian    uk
    Vietnamese    vi
    Welsh    cy
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    That was my first thought. Could be wrong but think the OP is saying their client wants to be able to enter the question either in English text or Arabic text - i.e. depends on the users keyboard/setup.

    @DC CS - Text is text, each character has a specific Ascii code. 0 to 255 is the English alphabet plus punctuation such a comma's and exclamation marks. Other languages and special characters (such as arrows) use higher ascii codes.

    Take a look at this link - might help

    https://answers.microsoft.com/en-us/...d-af5837336a8f

  4. #4
    DC CS is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Jan 2023
    Location
    Vaalpark, South Africa
    Posts
    84
    Hi all. What I need to achieve, is that the client needs to enter the question|(s) in English language, and on a second Textbox, enter the same question in Arabic.
    First price would be to translate the English question on the fly to Arabic, but if the client can enter the question in Arabic, it will be swell.

    I have tried several suggestions in the forums on the Web, but to no avail. It shows me English alphabet instead of Arabic.

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by DC CS View Post
    Hi all. What I need to achieve, is that the client needs to enter the question|(s) in English language, and on a second Textbox, enter the same question in Arabic.
    First price would be to translate the English question on the fly to Arabic, but if the client can enter the question in Arabic, it will be swell.

    I have tried several suggestions in the forums on the Web, but to no avail. It shows me English alphabet instead of Arabic.
    Seems like more work to me?
    If they only need to enter the question once, why not use that feature?
    What if you wanted it in two, three or more languages?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    Join Date
    Apr 2017
    Posts
    1,792
    Simply have the table of all questions with multiple fields for different languages. Something like
    tblQuestions: QuestionID, AnswerID, QustionEnglish, QuestionArabic, ...;
    and similar table for answers, like
    tblAnswers: AnswerID, AnswerEnglish, AnswerArabic, ...

    I advice instead typing questions and/or answers into textbox, use combo the user can select them in any language determined in SetUp table for app. The field AnswerID in tblQuestions will be used to check, was the selected answer the right one.

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    FWIW, I used the code from @moke123 and I get an arabic response.
    I do not, for something like Japanese, which I thought was because I did not have the language installed, so surprised that arabic worked.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by ArviLaanemets View Post
    Simply have the table of all questions with multiple fields for different languages. Something like
    tblQuestions: QuestionID, AnswerID, QustionEnglish, QuestionArabic, ...;
    and similar table for answers, like
    tblAnswers: AnswerID, AnswerEnglish, AnswerArabic, ...

    I advice instead typing questions and/or answers into textbox, use combo the user can select them in any language determined in SetUp table for app. The field AnswerID in tblQuestions will be used to check, was the selected answer the right one.
    Isn't that creating a non normalized structure?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

  10. #10
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    Quote Originally Posted by orange View Post
    Thanks Moke. I do not get arabic to work, but most others seem fine. En/fr/fi/de/cy...
    Me either but no idea why.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  11. #11
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    Quote Originally Posted by ArviLaanemets View Post
    Simply have the table of all questions with multiple fields for different languages. Something like
    tblQuestions: QuestionID, AnswerID, QustionEnglish, QuestionArabic, ...;
    and similar table for answers, like
    tblAnswers: AnswerID, AnswerEnglish, AnswerArabic, ...

    I advice instead typing questions and/or answers into textbox, use combo the user can select them in any language determined in SetUp table for app. The field AnswerID in tblQuestions will be used to check, was the selected answer the right one.
    Sorta what I did for a demo that translated form labels to different languages. I iterated through all the forms and captured the English labels. When a new language was selected it would add a field to the table and translate all the labels into that language. This eliminated the need to have a persistent internet connection and sped things up.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  12. #12
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Here is mine. I have to assume it is correct.
    Attached Thumbnails Attached Thumbnails Translate.JPG  
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  13. #13
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Here's my list showing working/not working.
    Code:
    Amharic.... ??? ?? ?? ????
    Arabic.... ????? ???? ???? ???
    Basque.... zakurra zaunka ozen ari da
    Bengali.... ????? ???? ??? ??? ????
    English (UK).... the dog is barking loudly
    Portuguese (Brazil).... the dog is barking loudly
    Bulgarian.... ?????? ??? ?????
    Catalan.... el gos està bordant fort
    Cherokee.... the dog is barking loudly
    Croatian.... pas glasno laje
    Czech.... pes hlasite šteká
    Danish.... hunden gøer højt
    Dutch.... de hond blaft luid
    English (US).... the dog is barking loudly
    Estonian.... koer haugub kõvasti
    Filipino.... ang aso ay tumatahol ng malakas
    Finnish.... koira haukkuu kovaa
    French.... le chien aboie fort
    German.... der Hund bellt laut
    Greek.... ? s????? ?aß???e? d??at?
    Gujarati.... ????? ????? ???? ??? ??
    Hebrew.... ???? ???? ???? ??
    Hindi.... ?????? ??? ?? ???? ??? ??
    Hungarian.... a kutya hangosan ugat
    Icelandic.... hundurinn geltir hátt
    Indonesian.... anjing itu menggonggong dengan keras
    Italian.... il cane abbaia forte
    Japanese.... ????????????
    Kannada.... ???? ?????? ???????????
    Korean.... ?? ?? ????
    Latvian.... suns skali rej
    Lithuanian.... šuo garsiai loja
    Malay.... anjing menyalak dengan kuat
    Malayalam.... ??? ????????? ?????????????
    Marathi.... ?????? ????? ????? ???
    Norwegian.... hunden bjeffer høyt
    Polish.... pies glosno szczeka
    Portuguese (Portugal).... the dog is barking loudly
    Romanian.... câinele latra zgomotos
    Russian.... ?????? ?????? ????
    Serbian.... ??? ?????? ????
    Chinese (PRC).... ??????
    Slovak.... pes hlasno šteká
    Slovenian.... pes glasno laja
    Spanish.... el perro ladra fuerte
    Swahili.... mbwa anabweka kwa sauti kubwa
    Swedish.... hunden skäller högt
    Tamil.... ???? ??????? ???????????
    Telugu.... ????? ???????? ???????????
    Thai.... ?????????????????
    Chinese (Taiwan).... ?????
    Turkish.... köpek yüksek sesle havliyor
    Urdu.... ??? ??? ??? ?? ????? ??? ???
    Ukrainian.... ?????? ??????? ??????
    Vietnamese.... con chó dang s?a ?m i
    Welsh.... mae'r ci yn cyfarth yn uchel

  14. #14
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Quote Originally Posted by moke123 View Post
    Me either but no idea why.
    Do you have any of the Arabic languages installed? I didn't but did an install. Problem was I'd have to restart pc for it to take effect and didn't want to do that.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  15. #15
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by Micron View Post
    Do you have any of the Arabic languages installed? I didn't but did an install. Problem was I'd have to restart pc for it to take effect and didn't want to do that.
    Where do you find that out, as I have no need whatsoever for an arabic language.
    In Windows I only have English (United Kingdom)
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to insert Hindi and regional language Text in ms access data base
    By sajjaswathi87@gmail.com in forum Programming
    Replies: 2
    Last Post: 07-03-2013, 03:41 AM
  2. Replies: 1
    Last Post: 03-20-2013, 02:57 AM
  3. Entering formula in text box
    By GregHolden in forum Reports
    Replies: 3
    Last Post: 02-02-2013, 07:48 PM
  4. Replies: 2
    Last Post: 09-25-2011, 08:52 AM
  5. Entering Text in Combo Form
    By Bobt in forum Forms
    Replies: 2
    Last Post: 10-22-2010, 03:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums