Translation Guide

The AutoView moodle module is split into 3 distinct parts, each of which needs to be translated separately.

  • The delivery platform, contained within the vresource directory.
  • The editor extension, contained in the avedit directory.
  • The Moodle wrapper module, everything else.

Where possible we recommend translating using the English version as a base, this is the original language of the module, translations which have been passed through multiple languages are likely to be less accurate. It isn't necessary to translate everything in one go, the translations can be added and activated on an as required basis.


Delivery Platform

vresource/lang contains the language strings for the core of the delivery platform, you should add a new language by creating a new .js file using your languages two letter code for the file name. Please note, AutoView doesn't yet properly support 'sub' languages so do not use names like pt_br.js. (The zh_cn.js file you will see in this directory isn't in use and was left over from an experiment which may be returned to later).

The vresource/utils/newlang.html file contains a tool which will help you with the translation and ensure that accented characters are correctly encoded in the .js file, so please use this tool for the translation.

Please pay special attention to the language string labelled helpurl. This tells AutoView where to find the help files for your language. If you have translated the help files, then this should simply be the two digit language code, if not then this string should either be omitted (make sure to delete the data["helpurl"]= line from the final .js file), this will cause the help to default to English. Alternatively, a substitute language code can be entered here if a more suitable alternative language to English is already available in the help directory.

The help files themselves are located in the vresource/help directory. Each language has its own subdirectory, again using the two letter language code. Simply make a copy of an existing language and work your way through.

Once the files have been put in the correct place in the module, the translation needs to be activated by editing the templates/autoview.xsl file. Load this file into a text editor and look for a section of code which looks like this :

<!-- *****Add new languages for the delivery platform to this section of code***** -->
<script type="text/javascript" src="{$vresource}lang/fr.js">//</script>
.......
<script type="text/javascript" src="{$vresource}lang/sk.js">//</script>
<!-- *****End of delivery platform languages***** -->

Make a copy of an existing line from this code at the end of the block, change the two letter language code to that of your new language and your translation should now be active in AutoView.


Editor

The editor works in exactly the same way as the AutoView delivery platform, so you will find the language files in the avedit/lang directory, along with another newlang.html tool for editing the language strings. Note, that in order to distinguish them, all editor languages string have a label which starts e_.

The editor language strings are activated in the same way as the delivery platform. Open the templates/autoview.xsl file in a text editor and look for the following block of code :

<!-- *****Add new languages for the editor to this section of code***** -->
<script type="text/javascript" src="{$aveditdir}lang/en.js">//</script>
.......
<script type="text/javascript" src="{$aveditdir}lang/pt.js">//</script>
<!-- *****End of editor languages***** -->

As with the delivery platform, make a copy of an existing line within this block and change the two letter language code to activate your translation.


Moodle Wrapper Module

The language strings used by the wrapper are contained in the top level lang directory within the module directory and work in exactly the same way as other Moodle language files, so these should be translated in accordance with Moodle's own translation instructions.


And Finally...

Please send us your translation and we will be happy to add it to the official AutoView download.

Last modified: Monday, 10 March 2014, 11:38 PM