• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I export text for translation and reimport it to replace the original language?

New Here ,
Aug 15, 2013 Aug 15, 2013

Copy link to clipboard

Copied

Hello,

I have to build quite a few text layers in a larger project.

This project has to be localized in 12 other languages.

Is there a way to export the textlayers to a .doc,.xls, .csv or similar fileformat for the translators which I then can re-import into my project so the language in the original layers is replaced while maintaining the position and keyframes etc.?

Any help is very appreciated, since I am not looking forward to a copy and paste orgy....

TOPICS
Scripting

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 15, 2013 Aug 15, 2013

Copy link to clipboard

Copied

I showed how to import text from a text document as well as writing text documents in episodes 16 and 17 of my After Effects ExtendScript training. They might help you.

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-16

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-17

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2013 Aug 16, 2013

Copy link to clipboard

Copied

Hi David,

thank you very much.

Is there a chance to download the script from your side?

Though I'm quite interested in all the details I'd just like to test the script for now quite swiftly. A colleague of mine who is far more script savy than I am could probably make some necessary alterations.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2013 Aug 16, 2013

Copy link to clipboard

Copied

Another thing I came across.

I tried your other tutorial here:

http://provideocoalition.com/pvcexclusive/story/expression_shorts_-_read_external_text_document

I copied the source code and adjusted the path (whcih works, I had it checked)

try{

myPath = "C:\\TEST\\01_Intro.txt";

$.evalFile(myPath);

eval(thisComp.name)[0];

}

catch(err)

{

err;

}

But I get an error message like this:

SyntaxError: Expected: ;

We tried this instead:

try{

myPath = "C:\\TEST\\01_Intro.txt";

$.evalFile(myPath);

//eval('' + thisComp.name + '[0];');

DE_Intro_fein[1];

}catch(err){

err;

};

And it worked. But If I don't want to hardcode (is this the right expression?) I need your code to be working.

Do you have any advice?

Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 19, 2013 Aug 19, 2013

Copy link to clipboard

Copied

I managed to do it with this tutorial (and it works now)

http://provideocoalition.com/pvcexclusive/story/expression_shorts_-_re ad_external_text_document

But I still have one concern:

When the translators have to use special characters like ö or ñ etc., is there anything I have to tell them or bear in mind when briefing them how to handle the txt file?

Thank you again for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 19, 2013 Aug 19, 2013

Copy link to clipboard

Copied

As far as I know that should be fine. My guess though is if any of those special characters exist only in a certain font, that you also have the same font. Otherwise the only special characters that I'm aware of that need special care are these:

http://www.w3schools.com/js/js_obj_string.asp

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 30, 2013 Aug 30, 2013

Copy link to clipboard

Copied

Hmmm, unfortunately my Greel translation produces only syntax errors. Do you have an idea to solve this?

I already asked some colleagues but they don't have any idea, either.

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 30, 2013 Aug 30, 2013

Copy link to clipboard

Copied

LATEST

Can you show what is inside C:\\TEST\\01_Intro.txt

Make sure your script file itself, and the external files, are all saved in UTF-8 format.  You can use a standard text editor--like Sublime--to ensure that it is.  Are you sure that the syntax errors that are thrown are a result of you reading an external text file with UTF-8 characters?

Typically if you're going to read an external file for data, you'll wants to use File.open('r').  Check the documentation on the File object.  $.evalFile is generally used when you want to read another script file, not a file that contains data.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines