To set the default language:

Choose Script Editor > Preferences.

Click General, and choose the language from the Default Language pop-up menu.
You can choose which of the installed Open Scripting Architecture (OSA) scripting languages to use. By default, the Script Editor contains just AppleScript and maybe AppleScript 2. Non-Apple OSA language implementations installed on the computer, such as JavaScript or UserTalk, will also appear.
Choose Script Editor > Preferences.
Click General, and choose the language from the Default Language pop-up menu.