Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > Languages and International Support > Topic : How to translate texts in mod_install.xml



Threaded Mode | Print  

 How to translate texts in mod_install.xml (1 Replies, Read 377702 times)
manoaratefy
Group: Member
Post Group: Newbie
Posts: 7
Status:
Hello,
I've written a mod for WordPress in Softaculous, using /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/conf/mods/wp/mod_install.xml and /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/conf/mods/wp/mods.php files.
Now, I want to translate texts on it for multiple languages. How to achieve that? I didn't found any documentation about this.
Thanks in advance.
IP: --   

How to translate texts in mod_install.xml
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5727
Status:
Hi,
I will explain it here :
1. In mod_install.xml you can use double curly braces instead of the original text. E.g. I want to translate the plugin name "Smart Maintenance Mode" so I will replace it as follows :
<head>{{maintenance_mode}}</head>
2. Now in mods.php in __wp_mod_settings function please globalize $softlang e.g.
global $softlang;
3. Now add your translated strings in this function after globalizing the array e.g. :
$softlang['english']['maintenance_mode'] = 'Smart Maintenance Mode';
$softlang['french']['maintenance_mode'] = 'Mode d\'entretien intelligent ';

Make sure the keys in $softlang matches the values you want to replace within double curly braces {{}} in the mod_install.xml
Let me know if you face any issues.


Edited by Brijesh : September 8, 2021, 11:47 am

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
4 guests, 0 users.


All times are GMT. The time now is October 4, 2024, 4:37 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.024