⟵ hearthere ⟶
  • Quick start
  • Install MIT
  • Install PRO
  • Updating
  • Optimization
  • Update v4-v6
  • Backups
  • Console utility bin/totum
  • Basics for users
  • Interface and Layout
  • Tables and their parameters
  • Prefilter
  • Fields and their parameters
  • Syntax
  • Code, actions, formatting
  • Relational relationships
  • Calculation order and calculation units
  • Auto-complete calculations and timing
  • Duplicate rows and cycles
  • Comparisons
  • Functions
  • Debugging
  • Print and CSV
  • API
  • Roles and users
  • Notifications
  • Scheduled Actions
  • System tables
  • Trees
  • Anonymous tables
  • External Forms
  • Exporting and importing tables
  • [PRO] MeiliSearch
  • [PRO] Databases
  • [PRO] Custom CSS
  • [PRO] Custom docs
  • [PRO] LDAP AD
  • [PRO] File versions
  • [PRO] List-unsubscribe
  • [PRO] Dynamic fields
  • [PRO] Only Office
  • [PRO] Auth Tokens
  • [PRO] 2FA
  • [PRO] Superlang
  • Enabling
  • Switching between languages
  • Translation Keys
  • Key Format
  • Key Correspondence Table
  • Direct Translation without Keys
  • Keys and Direct Indication in Codes
  • [PRO] Daemons
  • [PRO] Profiler
  • Connecting functions
  • [SRV] Installation and Connection
  • [SRV] Export, PDF, Upload, and Preview
  • [SRV] XLSX/DOCX Generators
  • PRO Superlang

    Enabling

    Enable superlang in Conf.php:

    nano /home/totum/totum-mit/Conf.php
    

    Add after the line with the main language const LANG = "en";:

    const isSuperlang = true; // - add to Conf.php
    

    Be sure to execute from the root installation folder:

    bin/totum schemas-update
    

    In the settings table, specify the list of available languages in the h_pro_langs field:

    [
      "en",
      "es"
    ]
    

    Available options: en, ru, es, de.

    Currently does not work for anonymous tables and forms.

    Switching between languages

    For the Creator, a technical Selector is available, which has a neutral mode where translation keys are visible:

    For the user, switching between languages is done from the user menu:

    It is possible to preset the language for the user and lock its change in the users table:

    • ttm__langs — specify the two-letter code from the available system languages. If empty, the default language is used.

    • ttm__block_lang — locks the language change for the user.

    Translation Keys

    Key Format

    A translation key in the format {[key_name]} can be specified anywhere in the system, and the ttm__langs table specifies the correspondences for all used languages.

    Key Correspondence Table

    Direct Translation without Keys

    A translation key can also be specified directly in a field or in code, without using the key table, in the format

    {[en:'Text in english';ru:'Текст на русском']}
    

    Keys and Direct Indication in Codes

    f1=: setFormat(condition: $#nfv = ""; text: "{[en:'Empty';es:'Está vacío']}")
    
    f2=: setFormat(condition: $#nfv = 3; comment: "{[some_key_from_table]}")