# Customization - Creating a language pack

## Making language packs

Language packs are simply JavaScript name/value arrays placed in the ".js" files in the "lang" directory. Remember to allways use the "lang_" prefix for these value names so that they don't override other variables in the templates. The example below shows how the cut, copy and paste texts are lang packed. Notice there are three kinds of language packs the first one is the general one shared by all themes these are located in the "jscripts/tiny_mce/langs" directory the secound ones are theme specific language packs these are contained in "jscripts/tiny_mce/themes/<some theme>/langs" and the last one is plugin specific language packs located in each plugin.

    tinyMCE.addToLang('',{
    cut_desc : 'Cut (Ctrl+X)',
    copy_desc : 'Copy (Ctrl+C)',
    paste_desc : 'Paste (Ctrl+P)'
    );

Remember the last translation line should not have a , character at the end. The first parameter to the addToLang is the prefix to add before each variable, this was added to reduce the overall size of the language packs to reduce the overall download time.

### Files to edit

When translating TinyMCE, these are the files that currently needs to be translated:

/tinymce/jscripts/tiny_mce/langs/en.js
/tinymce/jscripts/tiny_mce/plugins/<plugin>/langs/en.js
/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js

Notice some language variables may include a name/url of a gif image or simmilar, for example the button for bold has a "F" character in the Swedish language pack. There are also relative window sizes located in the language packs, for example is the link dialog needs to be bigger inorder to fit a specific translation you can alter the width of the window by modifying these variables.