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 (2 Replies, Read 508036 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: 5875
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

-----------------------
Softaculous
Pinguzo - Monitor Servers, Websites, API, Services 24x7
IP: --   

How to translate texts in mod_install.xml
Justinpaul
Group: Member
Post Group: Newbie
Posts: 4
Status:
In Softaculous mods, there isn’t really a built-in translation system tied directly to `mod_install.xml` or `mods.php`. Those files are mainly for defining install behavior and UI strings, so for multilingual support you usually need to externalize your text strings and handle translations separately (for example via language files or WordPress’s `__()` / `_e()` functions if the mod hooks into WP output).

If Softaculous doesn’t expose a translation layer for mods, the practical workaround is to structure your mod so all user-facing text is pulled from language arrays/files instead of being hardcoded.

Also, tools like изменить размер фото can be useful when preparing localized documentation or UI screenshots in different formats for multilingual guides.
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 16, 2026, 6:59 pm.

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