Editor - Settings - Includes - Languages

This view is used to add or modify languages in the database and list them. This view is to more data list on the whole page so it is recommended to paginate data.

Controller: languagesSettingsEditorCtrl

Main Models

  • Main: This model lists the main Languages key that are Currency, Main category name 1, Main category name 2, Main category name 3 y Main category name 4.
  • Translations: esta trae consigo todas la traducciones cargadas de la base de datos.

Models to filter

these variable are initiated in the HTML with ng-init

  • filterTranslation.key
  • filterTranslation.text

Utility Functions

  • updateTranslation(key): It serves to update the lang keys, these depend on the language.
  • addTranslations(): It is used to add new lang keys to the database.

Example of base theme

  1. main: If something changes here, activate the function updateTranslation(key)
  2. filterTranslation.key
  3. filterTranslation.text
  4. translations: If something changes here, activate the function updateTranslation(key)
  5. addTranslations(): add a translation using the model curLang.

The controller for this views contains a configuration for a spreatshet mode that is added with the following base code:

<hot-table hot-id="hot" settings="configs" min-spare-rows="1" datarows="dataTable" row-headers="false">
  <hot-column data="key" title="'Key'" validator="'empty-field'"></hot-column>
  <hot-column data="text" title="'Name'" validator="'empty-field'"></hot-column>

Spreadsheet example



Everything here works with the base code, only the styles must be changed.