EditArea documentation

# Customization - Creating a language translation

## Making language file

Language packs are simply JavaScript name/value arrays placed in the ".js" files in the "lang" directory. Notice there are two kinds of language packs.

- The first one is the general one located at "edit_area/langs/" and used by the EditArea core. The example below shows how the search and replace texts are lang packed.

      editAreaLoader.lang["en"]={
      search: "search",
      replace: "replace"
      };

- The second ones are plugins specific language packs. These are contained in "edit_area/plugins/<plugin_name>/langs/". Here is the example of the test plugin.

      editArea.add_lang("en",{
      test_select: "select tag",
      test_but: "test button"
      });

  For creating a new plugin, remember to always use the "<plugin_name>" prefix for these value names so that they don't override other variables in the templates.

Remember, the last translation line should not have a , character at the end.

### Files to edit

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

edit_area/langs/en.js
edit_area/plugins/<plugin_name>/langs/en.js

### Contributing your language pack

Go to the sourceforge patch page and upload a zip containing all the language files in the correct directory structure.
Please translate all the plugins, even if you aren't using them.