Skip to content

classes_essentials_translation_scavix_translationadmin.class

Daniel Spors edited this page Nov 11, 2020 · 4 revisions

Classes in file essentials/translation/scavix/translationadmin.class.php

class TranslationAdmin

SysAdmin handler for translations.

Namespace: ScavixWDF\Translation

Extends: TranslationAdminBase » SysAdmin » HtmlPage » Template » Renderable

CreateString

INTERNAL Create new string handler

Fetch

INTERNAL Fetch action handler

Import

INTERNAL Fetch action handler

ImportJSON

INTERNAL Imports a file with translations into the translation system. File must contain vaid JSON data with key-value pairs of strings in an array. Sample:

[	
{"term":"TXT_TERM1","content":"My contents of terms 1"},	
{"or":"TXT_TERM2","can_be":"My contents of terms 2"},	
{"whatever":"TXT_TERM3","wtf_too":"My contents of terms 3"}	
]	

Notes:

  • The key names will be ignored, only the order counts
  • The contents must be in the language defined by the $lang parameter
  • The uploaded file must be given as 'json_file' ($_FILES['json_file'])

Remove

INTERNAL Removes a term. Removes a term from all translations.

Rename

INTERNAL Renames a term. Sometimes you may want to correct a terms name, so use this one.

SaveString

INTERNAL Save string handler

Translate

INTERNAL Entry point for translation admin.

TranslateOne

INTERNAL Allow to translate a term in all languages

Clone this wiki locally