Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:public:functions-i18n

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

scriptlog:public:functions-i18n [2026/09/26 09:09] – admin adminscriptlog:public:functions-i18n [2026/09/26 09:17] (current) – admin admin
Line 14: Line 14:
 ======= Functions (14) ======= ======= Functions (14) =======
  
-  ^ Function ^ Line ^ Params ^ Returns ^ Summary ^ +^ Function ^ Line ^ Params ^ Returns ^ Summary ^ 
-  | ''t'' | 20 | 2 | ''string'' | t() - Translation function for frontend | +| ''t'' | 20 | 2 | ''string'' | t() - Translation function for frontend | 
-  | ''detect_browser_locale'' | 49 | 0 | ''string'' | detect_browser_locale() - Detect browser locale | +| ''detect_browser_locale'' | 49 | 0 | ''string'' | detect_browser_locale() - Detect browser locale | 
-  | ''load_theme_translations'' | 81 | 1 | ''array'' | load_theme_translations() - Load translations from JSON file | +| ''load_theme_translations'' | 81 | 1 | ''array'' | load_theme_translations() - Load translations from JSON file | 
-  | ''reset_i18n_cache'' | 107 | 0 | ''void'' | reset_i18n_cache() - Reset translation cache | +| ''reset_i18n_cache'' | 107 | 0 | ''void'' | reset_i18n_cache() - Reset translation cache | 
-  | ''locale_url'' | 117 | 2 | ''string'' | locale_url() - Get URL with locale prefix | +| ''locale_url'' | 117 | 2 | ''string'' | locale_url() - Get URL with locale prefix | 
-  | ''is_locale_prefix_enabled'' | 154 | 0 | ''bool'' | is_locale_prefix_enabled() - Check if locale prefix should be added | +| ''is_locale_prefix_enabled'' | 154 | 0 | ''bool'' | is_locale_prefix_enabled() - Check if locale prefix should be added | 
-  | ''get_default_locale'' | 174 | 0 | ''string'' | get_default_locale() - Get the default locale | +| ''get_default_locale'' | 174 | 0 | ''string'' | get_default_locale() - Get the default locale | 
-  | ''get_locale'' | 189 | 0 | ''string'' | get_locale() - Get current locale | +| ''get_locale'' | 189 | 0 | ''string'' | get_locale() - Get current locale | 
-  | ''available_locales'' | 204 | 0 | ''array'' | available_locales() - Get available locales | +| ''available_locales'' | 204 | 0 | ''array'' | available_locales() - Get available locales | 
-  | ''is_rtl'' | 219 | 0 | ''bool'' | is_rtl() - Check if current locale is RTL | +| ''is_rtl'' | 219 | 0 | ''bool'' | is_rtl() - Check if current locale is RTL | 
-  | ''get_html_dir'' | 234 | 0 | ''string'' | get_html_dir() - Get HTML dir attribute | +| ''get_html_dir'' | 234 | 0 | ''string'' | get_html_dir() - Get HTML dir attribute | 
-  | ''get_language_name'' | 244 | 2 | ''string'' | get_language_name() - Get human-readable language name | +| ''get_language_name'' | 244 | 2 | ''string'' | get_language_name() - Get human-readable language name | 
-  | ''get_all_language_names'' | 265 | 0 | ''array'' | get_all_language_names() - Get all available language names | +| ''get_all_language_names'' | 265 | 0 | ''array'' | get_all_language_names() - Get all available language names | 
-  | ''language_switcher'' | 286 | 1 | ''string'' | language_switcher() - Generate language switcher HTML |+| ''language_switcher'' | 286 | 1 | ''string'' | language_switcher() - Generate language switcher HTML |
  
  
Line 41: Line 41:
 t() - Translation function for frontend t() - Translation function for frontend
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$key'' | ''string'' | //required// |  | +|  ''$key'' |  ''string'' |  //required// |   | 
-  | ''$params'' | ''array'' | ''[]'' |  |+|  ''$params'' |  ''array'' |  ''[]'' |   |
  
  
Line 67: Line 67:
 load_theme_translations() - Load translations from JSON file load_theme_translations() - Load translations from JSON file
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$locale'' | ''string'' | //required// |  |+|  ''$locale'' |  ''string'' |  //required// |   |
  
  
Line 92: Line 92:
 locale_url() - Get URL with locale prefix locale_url() - Get URL with locale prefix
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$path'' | ''string'' | '''''' |  | +|  ''$path'' |  ''string'' |  '''''' |   | 
-  | ''$locale'' | ''?string'' | ''null'' |  |+|  ''$locale'' |  ''?string'' |  ''null'' |   |
  
  
Line 173: Line 173:
 get_language_name() - Get human-readable language name get_language_name() - Get human-readable language name
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$locale'' | ''string'' | //required// |  | +|  ''$locale'' |  ''string'' |  //required// |   | 
-  | ''$native'' | ''bool'' | ''true'' |  |+|  ''$native'' |  ''bool'' |  ''true'' |   |
  
  
Line 199: Line 199:
 language_switcher() - Generate language switcher HTML language_switcher() - Generate language switcher HTML
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$args'' | ''array'' | ''[]'' |  |+|  ''$args'' |  ''array'' |  ''[]'' |   |
  
  
scriptlog/public/functions-i18n.txt · Last modified: by admin