Each time the Google translation API is run, the results are saved into the K-Rise dictionary. This makes the next page load faster because the API is only run for phrases/text that do not have a matching entry in the dictionary.
Dictionary Entries can be viewed in the “Work with Translation” admin page. From here entries can be added, deleted, viewed, searched, downloaded and edited.
The dictionary also allows us to provide Admin overrides for certain phrases. Sometimes after a page has been translated, the individual words are translated successfully, but together, they form a phrase which has a better suited translation that is not shown. This can be fixed by editing the dictionary entry. The next time the page loads we will match the text on the page with a dictionary entry and use the new admin entered translation.
View, Edit, and Delete Dictionary Entries
The “Work with Translation” admin page allows the admin to view all the dictionary entries. Since so many entries can exist, the user must first select a language from the drop down menu for the list section to populate.
Once the list section is populated, the admin can view, edit, and delete existing dictionary entries.
Each line in the list section of dictionary entries has a “Change” link. This is where the admin overrides are entered. Since the Google API is only run the first time, the text will have a saved dictionary entry which will be used for all subsequent translations. If the translation returned from the API is not correct, or you wish to change the translation, the entries can be edited and everywhere the text is shown, it will be replaced with your entered translation for the selected language.
Dictionary Entries can be deleted from the list section with the “Delete” button on each line of the list section. Deleting an entry will delete it from the database where the dictionary is stored. This means, when the page loads next, if the text is found on the page again, since there is no dictionary entry found, the Google API will run and a new entry will be saved for the resulting translation.
After a list section is showing the desired results (by selecting the appropriate language and applying search filters), the list can be downloaded by clicking the download icon in the top left corner of the list section.
The downloaded spreadsheet will have the three required columns of a translation: Language, Text, and Translated Text.
Add New Dictionary Entries
When configuring a site for a new language, admin users can upload a batch of dictionary entries at once using either the “Quick Add” or the “Excel Upload” feature. Both of these features require 3 pieces of information: the text to be translated (Text), the translation (Translated Text), and the language (Language).
The “Quick Add” feature allows many to be input at once via the UI.
The excel upload feature requires that the 3 pieces of information be given in an excel. This allows for large numbers of dictionary entries to be entered at once. The template for the upload can be obtained by downloading a translation list. This will create a spreadsheet with the 3 required columns.