I work in an organisation with 47 member states and two official languages, English and French. I would like to be able to produce a simple macro that would run through a Corel Draw graphic (e.g. a pie-chart) and change the names of all the countries from English to French.
I tried recording a macro, but the result was a series of messages in the macro telling me that “Recording of this command is not supported: TextEdit”.
Does anyone know if it’s possible to do what I want?
Something like this:
For Each s In ActiveDocument.ActivePage.Shapes If s.Type = cdrTextShape Then If s.Text.Story = "Canada" Then s.Text.Story = "le Canada" Else If s.Text.Story = "United States" Then s.Text.Story = "les États-Unis" Else If s.Text.Story = "..." Then s.Text.Story = "..."
.... do the same for other countries...
End If End If
Next s
<Hendrik Wagenaar> wrote in message news:48817@coreldraw.com... Something like this....
Something like this....
Jeff Harrison said: Hi Hendrik, I have something a tad more ambitious in mind.. so far, I think it's possible.... :-D
I don't doubt that Jeff, but Corbeau is looking to learn, so providing some sample code may be more valuable than a premade solution. Who knows, he might one day be selling macros on your site. I admire those brave enough to jump into VBA coding.
Best regards,Hendrik
Hendrik Wagenaar said:I don't doubt that Jeff, but Corbeau is looking to learn, so providing some sample code may be more valuable than a premade solution. Who knows, he might one day be selling macros on your site. I admire those brave enough to jump into VBA coding.
heh, I also admire them... :-D
Here is my idea: to translate entire languages using a pre-existing API, in this case, Google's (thanks to Shelby). Blocks of text go to an online translation engine, and are then returned to Draw's page.
The quality of the translation will be dependent on the the engine... but the macro accesses the latest translations automatically.
One thing to watch for is the length of strings and paragraph text frames, since the qty. of words coming back can exceed the original language. So designs might need to be adjusted to allow.
Jeff Harrison said:Blocks of text go to an online translation engine, and are then returned to Draw's page.
Very cool.
Wow! Very sophisticated.
Great idea, Jeff, but the Google translator is not perfect, and the results sometimes are good enough, sometimes are really wrong. It works better for individual words than a phrases. For example, your text: "Testing the macro translator is fun" is translated as "Prueba de la macro traductor es divertido", but this is not correct, and have not sense on spanish. "La prueba de la Macro traductora es divertida" o "Probar la macro traductora es divertido" sounds better. In English you will have three options, He, She and It, but in spanish "it" is not neutral, spanish uses "it" also as "he" or "she" ("eso" or "esa", "esto" or "esta", "aquello" or "aquella"). This is one of the greatest and most common problems of the learning of spanish, because this difference has not sense in your language. In spanish, "the Test" (la prueba) is not "neutral", is "feminine".
And more: try to translate "testing the macro translator is fun" with Google translator, and you will have diffrent result than "Testing the macro translator is fun". The T capital changes the sense of the entire phrase.
The Macro Translator is a powerful addition, but it need to use a better engine than Google
hi Ariel,
This is good info from you.. thanks for taking this time.
Curious, can you suggest better engine? It should be possible for us to hook into anything online, perhaps not through back-end API, but through usual web interface.
As you say, the conversion quality depends on how well the original English is written...
LOL... maybe you have seen instruction manuals that have come from the Orient after conversions to English? I got one with a digital scale this last Christmas. Usually you can "make out" what they are trying to communicate, but this one was so far out to lunch there was no hope.
Maybe you are like me... for a short thing, I almost want to translate to English for FREE, to help. In an online dating forum, I saw a Latin gal who seemed quite nice. Her profile was understandable, but I took 10 minutes to correct it to perfect English.
She was quite offended! Then I explained.. if I was on dating site in Russia (as an example) and someone offered to improve my poor Russian profile, why would I say no? Oh well.
Ariel said:The Macro Translator is a powerful addition, but it need to use a better engine than Google