Free Function Friday getAELanguage

FFF Header

Welcome to Free Function Friday episode 17 getAELanguage. This function helps return the basic string name of the language that After Effects is running in. Normally calling the language attribute will return an enumerated value like 1612. Not very handy if you don’t know what language that refers to, and also not handy when the potential for each version of After Effects having changed those numbers is a possibility. If you ever decide to make multi language versions of your scripts, you will need to check for the language that After Effects is currently running in, so why not get a simple answer. We’ll do all of the rough stuff today so you don’t have to do it tomorrow, or the next day, and hopefully never again. Ok, maybe not never, but not nearly as much at least. Normally you get the language version by calling…
app.language;
To compare and see if the current language is specifically, say English (enumerated as 1612 in AE CC 2014) then you have to type it this way…
app.language == Language.ENGLISH;
That second part, looks a bit odd, but it is the format that we have to use. When directly comparing we use the term Language with a capital L, and the second attribute is the language name in all caps. In this case it is ENGLISH. As of After Effects CC 2014 the language options are:

ENGLISH
CHINESE
FRENCH
GERMAN
ITALIAN
JAPANESE
KOREAN
SPANISH
RUSSIAN
PORUGUESE

If you haven’t done so already there is a Free Function Friday introduction video located here that has some important information pointing to a few resources that will come in handy when scripting for After Effects.

Episode 17 getAELanguage:

 

Legal note: The Adobe ExtendScript code talked about in this article and accompanying embedded video(s), and/or graphic images are not guaranteed to be compatible with every version of After Effects. David Torno, ProVideo Coalition, and Diversified will not be held liable for any misuse or incorrect use of the provided ExtendScript code. Use at your own risk.

All of the code I provide in this series, has been created and tested in After Effects CC 2014. Unless otherwise specified in the episode, the code should be compatible with After Effects CS6 through CC 2015. I’ve done my best to avoid depreciated code (code that Adobe removed at some point), and made these functions as compatible as possible. There will however be the occasional piece of code that is brand new as of a certain version of After Effects and therefore will not be backwards compatible from that version. I will mention these if that is the case.

With that said, all the code I provide in this series is open source and free to use in your scripts. I highly encourage you to expand and improve upon the code I provide and start making your own custom functions as well, but please do not repost the code I show in this series as is and claim it as your own. If you use any of the code provided in this series please give credit where credit is due. This series is meant to provide, what I feel is useful code, as well as to hopefully further explain ExtendScript and it’s quirks. While the functions we build throughout this series can perform a task all on their own, they are not meant to be a solo script. How you combine them together and expand upon them is when you will gain the most from these functions.


David Torno

David Torno is a Visual Effects professional based in Los Angeles, California. His work over the years has included commercials, feature films, music videos, and multimedia projects. During his free time, David enjoys expanding his knowledge in Visual Effects by learning new softwares and techniques that are being used. Along the way he also contributes to the visual effects community by offering helpful tools, and tutorials that creative professionals around the world can benefit from.

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz