Automatically setting the target language in Word documents Thread poster: 2nl (X)
| 2nl (X) Netherlands Local time: 23:38
I modified a well-known macro in order to allow automatically setting the target language in Word documents that have been translated with CafeTran for Mac:
http://cafetran.wikidot.com/auto-setting-the-target-language-in-docx
Upon opening your translation, the correct target language (currently supported: DE, EN, FR, NL, ES, IT) is assigned to... See more I modified a well-known macro in order to allow automatically setting the target language in Word documents that have been translated with CafeTran for Mac:
http://cafetran.wikidot.com/auto-setting-the-target-language-in-docx
Upon opening your translation, the correct target language (currently supported: DE, EN, FR, NL, ES, IT) is assigned to all textual elements of your target file. ▲ Collapse | | | Michael Beijer United Kingdom Local time: 22:38 Member Dutch to English + ...
2nl wrote:
I modified a well-known macro in order to allow automatically setting the target language in Word documents that have been translated with CafeTran for Mac:
http://cafetran.wikidot.com/auto-setting-the-target-language-in-docx
Upon opening your translation, the correct target language (currently supported: DE, EN, FR, NL, ES, IT) is assigned to all textual elements of your target file.
Thanks for the macro Hans, but can we also have a little information on how to use it? Does it work in the Windows version of Word? | | | 2nl (X) Netherlands Local time: 23:38 TOPIC STARTER How to run the macro | Jun 1, 2015 |
Michael Beijer wrote:
Thanks for the macro Hans, but can we also have a little information on how to use it? Does it work in the Windows version of Word?
You are very welcome indeed.
You have to install the AutoOpen macro in ... the AutoOpen part of your normal.dotx. Add the line with the timer if the AutoOpen macro already exists (else add the complete AutoOpen macro). Install the second macro (see http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm). It should run on Windows too. It's more work for me to test this than for you, since I'd have to start Parallels first.
If you've installed both macros, every document that you open will be set to English automatically. How's that? | | | Michael Beijer United Kingdom Local time: 22:38 Member Dutch to English + ... Hmm, not very useful. | Jun 1, 2015 |
2nl wrote:
Michael Beijer wrote:
Thanks for the macro Hans, but can we also have a little information on how to use it? Does it work in the Windows version of Word?
You are very welcome indeed.
You have to install the AutoOpen macro in ... the AutoOpen part of your normal.dotx. Add the line with the timer if the AutoOpen macro already exists (else add the complete AutoOpen macro). Install the second macro (see http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm). It should run on Windows too. It's more work for me to test this than for you, since I'd have to start Parallels first.
If you've installed both macros, every document that you open will be set to English automatically. How's that?
Every time I open a Dutch (nl-NL or nl-BE) source text from a client and want to do file prepping, this macro would change that to English?
It would be much better for CafeTran to just take the target language of the project and apply that to whatever it exports as a target document. How hard could that be to code for Igor? I admit that I know virtually nothing about Java and what this would actually mean in terms of coding, but it seems like it ought to be trivial. | |
|
|
2nl (X) Netherlands Local time: 23:38 TOPIC STARTER Only when the file name contains nl_NL | Jun 1, 2015 |
Michael Beijer wrote:
Every time I open a Dutch (nl-NL or nl-BE) source text from a client and want to do file prepping, this macro would change that to English?
Only when the file name contains nl_NL the target language is changed to Dutch, etc.
[Edited at 2015-06-01 16:48 GMT] | | | Michael Beijer United Kingdom Local time: 22:38 Member Dutch to English + ... Not very satisfying. | Jun 1, 2015 |
2nl wrote:
Michael Beijer wrote:
Every time I open a Dutch (nl-NL or nl-BE) source text from a client and want to do file prepping, this macro would change that to English?
Only when the file name contains nl_NL the target language is changed to Dutch, etc. [Edited at 2015-06-01 16:48 GMT]
I often can't change the names of client files, and anyway, this would very quickly get very confusing (all this changing of file names to and between various languages). | | | 2nl (X) Netherlands Local time: 23:38 TOPIC STARTER
Michael Beijer wrote:
I often can't change the names of client files, and anyway, this would very quickly get very confusing (all this changing of file names to and between various languages).
It's not the question whether YOU would like to change the name of the exported target file. CafeTran does so automatically: it adds _en-GB to it. It would be simple if you'd just give it a try. It's clever. | | | Michael Beijer United Kingdom Local time: 22:38 Member Dutch to English + ... Had dat dan allemaal wat eerder gezegd jongen! | Jun 1, 2015 |
2nl wrote:
Michael Beijer wrote:
I often can't change the names of client files, and anyway, this would very quickly get very confusing (all this changing of file names to and between various languages).
It's not the question whether YOU would like to change the name of the exported target file. CafeTran does so automatically: it adds _en-GB to it. It would be simple if you'd just give it a try. It's clever.
Aha, in that case it might be useful.
A CT-based solution would obviously be much better, but I'll fiddle around with this until then. You can't really expect all CT users to (know how to or be able to) install a solution like this.
[Edited at 2015-06-01 17:26 GMT] | |
|
|
2nl (X) Netherlands Local time: 23:38 TOPIC STARTER Actually I designed it with you in mind | Jun 1, 2015 |
Michael Beijer wrote:
You can't really expect all CT users to (know how to or be able to) install a solution like this.
Actually I designed it with you in mind. | | | Michael Beijer United Kingdom Local time: 22:38 Member Dutch to English + ... same macro as "LangID" function in CodeZapper | Jun 1, 2015 |
Interesting, the macro you posted is the exact same one used in CodeZapper's "LangID" function:
"LangID: Set language throughout document (all story ranges). Enter the LanguageID code in the input box displayed: 1036 = French, 1043 = Dutch, 1033 = EnglishUS, 2057 = EnglishUK, 1034 = Spanish, 1031 = German, 1040 = Italian, 1053 = Swedish, 1041 = Japanese, 1038 = Hungarian, 1037 = Hebrew, 1032 = Greek, etc. See: ... See more Interesting, the macro you posted is the exact same one used in CodeZapper's "LangID" function:
"LangID: Set language throughout document (all story ranges). Enter the LanguageID code in the input box displayed: 1036 = French, 1043 = Dutch, 1033 = EnglishUS, 2057 = EnglishUK, 1034 = Spanish, 1031 = German, 1040 = Italian, 1053 = Swedish, 1041 = Japanese, 1038 = Hungarian, 1037 = Hebrew, 1032 = Greek, etc. See: http://msdn.microsoft.com/en-us/library/bb213877.aspx"
src: Readme CodeZapper 2_9_4.doc + http://asap-traduction.com/CodeZapper
Michael
[Edited at 2015-06-02 00:17 GMT] ▲ Collapse | | | 2nl (X) Netherlands Local time: 23:38 TOPIC STARTER I wouldn't say that | Jun 2, 2015 |
It's not the same. It's similar. But there are differences. CZ doesn't work in Word for Mac and the macro that I have posted doesn't require human input (once installed). It recognizes your target language based on the language code in the name of the document that you exported from CT. | | | 2nl (X) Netherlands Local time: 23:38 TOPIC STARTER Solved in CafeTran! | Jun 4, 2015 |
As of June 3, 2015 CafeTran automatically sets the target language in all stories (headers, footers, text boxes etc.) in MS Word documents.
Source document:

In the target document all stories have the correct target language assigned:

[Edited at 2015-06-04 06:47 GMT] | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » Automatically setting the target language in Word documents Anycount & Translation Office 3000 |
---|
Translation Office 3000
Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.
More info » |
| CafeTran Espresso |
---|
You've never met a CAT tool this clever!
Translate faster & easier, using a sophisticated CAT tool built by a translator / developer.
Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools.
Download and start using CafeTran Espresso -- for free
Buy now! » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |