-
Notifications
You must be signed in to change notification settings - Fork 0
Translation module manual.en
Table of Contents
- [Module Features](#1 Module Features)
- [Operating steps](#2 Operating steps)
- [Translate file produce](#3 Translate file produce)
- [Translate the web page](#4 Translate the web page)
- User: Developers or translators
- Usage: Translation module is a feature that provides you with the ability to extract variables with translation tag, translators can make csv files according to the source.
- Module functional constitute:
- Set source path
- Set source directory structure
- Set search path
- Set output path
- Set output file name
- Process
- Preview the results
- Download file
2.1 Enter the Translation Module
- Sign in to the admin platform
- Select OPERATION>Translation, This will lead you to the Translation module
2.2 Set source path
Set source path is used to set the directory which need to be processed.Relative path mode is used to represent file path, user need to place the files that need to be translated in upload/translation/source/ directory beforehand, write permission for this directory is needed, user can upload using ftp or other means.
For example, place the following directory structure in upload/translation/source/.
After user enters the path, system will automatically detect whether the path exists. If so, "Path is valid" will be displayed;
If not, "No path exists" will be displayed. Please reconfirm the correct path.
2.3 Set source directory structure
Select directory structure for the source path to filter unwanted search directory and generates the corresponding directories and files.
As for Pi / Module / Theme modes, system already set up corresponding filter directory list and the build directory format, also it can detect whether the source path user input corresponds to this format, if not prompt the user to select the correct mode.
For example, /test corresponds to the mode Pi, /test/usr/module/article corresponds to the mode Module, /test/usr/theme/default corresponds to the mode Theme.
If you want to specify a directory to search, select Custom mode.
2.4 Set search path
Skip paths are directories and files under source path which do not need to be searched, different model type correspond to different skip path. Also, user can modify the filter directorys.
User can also choose Custom mode to customize skip path. When user selected Custom mode, a directory tree will be displayed, just click on the directory which need to be searched.
2.5 Set output path
Output path is the generated translation file's saving path, please notice that the folder can not contain already generated files, also write permission for this directory is needed.
2.6 Set output file name
When selected Custom mode, specify the output file name is allowed. You just need to input the file name, no suffix is needed, the system will defaultly output .csv file.
2.7 Process
Click the process button after you correctly complete all the above information, later results will be displayed in the bottom of the page.
2.8 Process result
Results generated as shown below, you can check files under paths or click the Download button to download files.
2.9 Download
You can download csv files with the previously set structure by clicking the Download button, or click Return button to reset parameters. A generated structured directory with Pi mode as shown below.
Open the generated csv file, replace row B with translated words and save the file. In this way, you produced a translate file.
Notice
-
Translated content need to be surrounded by half-angle quotes, to prevent the systems do not recognize.
-
Set the encoding format as UTF-8.
After produce a translate file, place the translate file into the correspond locale folder. For example, place the Chinese translate file in /locale/zh-cn, Engilsh file in /locale/en. The file you download already contains the correspond directory structure, you just need to create corresponding language folder and place the translate file main.csv in it, then copy it into the system directory usr.
After placing the translate file into correct position, sign in to the admin platform, select SETTING>System, Change locale for application content. Do not forget to click the submit button at the bottom of the page.
At last, select OPERATION>System>Toolkit, flush cache for the changes to take effect.
Thus completing the modification of the page language.