Hi I am translating from English to French the contextual menu file of a web app written in PHP-MySQL. I downloaded the relevant PHP file, and I started the translation using text editor “Visual Studio Code“, but strings remaining to be translated gets colored in red to notify an inappropriated entry after that a single quote ( ‘ ) was entered, e.g : From english : This page no longer exists To french : Cette page n’existe plus From reading solutions proposals on the web, I understood that using the “addslash()“ function (or stripslash alternatively) may prevent display issues in the web app contextual menu, but this also seems to depend on MySQL configuration : something about handling or not such this “mysql_real_escape_string“ parameter. /// Q1 /// Is adding last string such as in the example below the correct way to apply the “addslash()“ function ? I am asking the question because even doing so, strings in the editor remains colored in red…. Source : https://www.php.net/manual/fr/function.addslashes.php <?php $data['147'] = 'Menu'; $data['148'] = 'Vue'; $data['149'] = 'profile de'; $data['150’] = ‘Cette page n’existe plus'; eval("echo '" . addslashes($str) . "';"); ?> ******************************* A the end of the last string, ( ; ) was removed, so that only the single quote ( ' ) remains between the the double quotes. /// Q2 /// Do I have to check configuration of MySQL db and modify something ? If yes, can someone please tell what to modify, and how to do it ? Regards
Simply use a backslash, e.g. for Let's Encrypt: PHP: $wb['limit_ssl_letsencrypt_txt'] = 'Let\'s Encrypt available';
Code: $data['150’] = ‘Cette page n’existe plus'; The line you posted contains several wrong chars btw. after 150 the ’ must indeed be ' and before the word Cette, the ‘ must be '. In programming languages, it matters if you use ' or ´ or ` or ". Better use the builtin language editor in ISPConfig instead of Visual Studio to translate language files as the buitin editor ensures that everything is quoted correctly.