Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

translate Iproperties ? with google translate ?

1 REPLY 1
Reply
Message 1 of 2
Darkforce_the_ilogic_guy
586 Views, 1 Reply

translate Iproperties ? with google translate ?

Darkforce_the_ilogic_guy
Advisor
Advisor

I found this code that some other use to translate  text in an other program ... is it possible to somthing like this in inventor ?  maybe make an marco that will traslate descition form danish to english ? and ask user if they want to replace the text with the english version?  best if it possible to make change before replacing sind google tralsate is not prefekt 

Sub test()
    Dim s As String
    s = "hello world"
    MsgBox transalte_using_vba(s)

End Sub

 

 Function transalte_using_vba(str) As String
' Tools Refrence Select Microsoft internet Control


    Dim IE As Object, i As Long
    Dim inputstring As String, outputstring As String, text_to_convert As String, result_data As String, CLEAN_DATA

    Set IE = CreateObject("InternetExplorer.application")
    '   TO CHOOSE INPUT LANGUAGE

    inputstring = "auto"

    '   TO CHOOSE OUTPUT LANGUAGE

    outputstring = "es"

    text_to_convert = str

    'open website

    IE.Visible = False
    IE.navigate "http://translate.google.com/#" & inputstring & "/" & outputstring & "/" & text_to_convert

    Do Until IE.ReadyState = 4
        DoEvents
    Loop

    Application.Wait (Now + TimeValue("0:00:5"))

    Do Until IE.ReadyState = 4
        DoEvents
    Loop

    CLEAN_DATA = Split(Application.WorksheetFunction.Substitute(IE.Document.getElementById("result_box").innerHTML, "</SPAN>", ""), "<")

    For j = LBound(CLEAN_DATA) To UBound(CLEAN_DATA)
        result_data = result_data & Right(CLEAN_DATA(j), Len(CLEAN_DATA(j)) - InStr(CLEAN_DATA(j), ">"))
    Next


    IE.Quit
    transalte_using_vba = result_data


End Functions

  

translate Iproperties ? with google translate ?

I found this code that some other use to translate  text in an other program ... is it possible to somthing like this in inventor ?  maybe make an marco that will traslate descition form danish to english ? and ask user if they want to replace the text with the english version?  best if it possible to make change before replacing sind google tralsate is not prefekt 

Sub test()
    Dim s As String
    s = "hello world"
    MsgBox transalte_using_vba(s)

End Sub

 

 Function transalte_using_vba(str) As String
' Tools Refrence Select Microsoft internet Control


    Dim IE As Object, i As Long
    Dim inputstring As String, outputstring As String, text_to_convert As String, result_data As String, CLEAN_DATA

    Set IE = CreateObject("InternetExplorer.application")
    '   TO CHOOSE INPUT LANGUAGE

    inputstring = "auto"

    '   TO CHOOSE OUTPUT LANGUAGE

    outputstring = "es"

    text_to_convert = str

    'open website

    IE.Visible = False
    IE.navigate "http://translate.google.com/#" & inputstring & "/" & outputstring & "/" & text_to_convert

    Do Until IE.ReadyState = 4
        DoEvents
    Loop

    Application.Wait (Now + TimeValue("0:00:5"))

    Do Until IE.ReadyState = 4
        DoEvents
    Loop

    CLEAN_DATA = Split(Application.WorksheetFunction.Substitute(IE.Document.getElementById("result_box").innerHTML, "</SPAN>", ""), "<")

    For j = LBound(CLEAN_DATA) To UBound(CLEAN_DATA)
        result_data = result_data & Right(CLEAN_DATA(j), Len(CLEAN_DATA(j)) - InStr(CLEAN_DATA(j), ">"))
    Next


    IE.Quit
    transalte_using_vba = result_data


End Functions

  

Labels (1)
1 REPLY 1
Message 2 of 2

yana.mayami.87
Community Visitor
Community Visitor

It is very interesting. I tried to make a translation through google translator, but I did not understand anything. Could there be translation errors? latin - programming language, and I want to use this translator www.translate.com/latin-english It is paid, so I have more hopes that the translation will be more accurate, besides, here the machine translation is manually checked by specialists. I think that this is the right decision since I did not get accuracy in translation from Google translator.

0 Likes

It is very interesting. I tried to make a translation through google translator, but I did not understand anything. Could there be translation errors? latin - programming language, and I want to use this translator www.translate.com/latin-english It is paid, so I have more hopes that the translation will be more accurate, besides, here the machine translation is manually checked by specialists. I think that this is the right decision since I did not get accuracy in translation from Google translator.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report