/** * Prints a string in the current language. * * @example * <code> * //print something in the user language * _e('Pages'); * </code> * @example * <code> * //get a string in the user language * $pages_string = _e('Pages',1); * print $pages_string; * </code> * * @use current_lang() */ function _e($k, $to_return = false) { static $lang_file; global $mw_new_language_entires; $k1 = mw()->url_manager->slug($k); $lang = current_lang(); $mw_language_content = get_language_file_content(); if (isset($mw_language_content[$k1]) == false) { //if (is_admin() == true) { $k2 = $k; $mw_new_language_entires[$k1] = $k2; $mw_language_content[$k1] = $k2; if (!defined('MW_LANG_STORE_ON_EXIT_EVENT_BINDED')) { define('MW_LANG_STORE_ON_EXIT_EVENT_BINDED', 1); $scheduler = new \Microweber\Providers\Event(); // schedule a global scope function: $scheduler->registerShutdownEvent('__store_lang_file'); } //} if ($to_return == true) { return $k; } echo $k; } else { if ($to_return == true) { return $mw_language_content[$k1]; } echo $mw_language_content[$k1]; } }
.mw-ui-table .mw-ui-field{ background-color: transparent; border-color: transparent; width: 300px; height: 36px; resize: none; } .mw-ui-table .mw-ui-field:hover, .mw-ui-table .mw-ui-field:focus{ background-color: white; border-color:#C6C6C6 #E6E6E6 #E6E6E6; resize: vertical; } </style> <?php $cont = get_language_file_content(); if (!empty($cont)) { ?> <form id="language-form-<?php print $params['id']; ?> "> <table width="100%" border="0" class="mw-ui-table" cellspacing="0" cellpadding="0"> <thead> <tr> <th scope="col">Key</th> <th scope="col">Value</th> </tr> </thead> <tbody> <?php