Widget .po translations

Version 1.57

Feature
Finished

Plugins which have widgets may want to offer translations for those widgets. For example, if you were to call: CMD_WIDGET?item=main&json=yes&show=WGT_PLUGINS_ADMIN_HELLO_WORLD and you had files at: /usr/local/directadmin/plugins/hello_world/admin/widgets/WGT_PLUGINS_ADMIN_HELLO_WORLD/lang/nl.po where "/admin/" can be replaced with "/reseller/" or "/user/", as needed. DA would include this under the "languages" index in the result, eg: { "WGT_PLUGINS_ADMIN_HELLO_WORLD": { "languages": { "nl": { ... translations ... } } "main": "<h3>main html</h3>" ... } } ====== CUSTOM .po If you want to override the nl.po, there are other listing options. The same priority options are available to widget lang directory, the same as for skins: https://www.directadmin.com/features.php?id=2360 DA just overrides the document root, so be the WGT dir instead Also, it does not convert/save a json file for caching purposes. The reason is that the return value is a sub-set of a container, so cannot just be dumped directly to the "nl" index in the same manner, else everything would be escaped, littered with \n etc.

Interested to try DirectAdmin? Get a 30-day Free Trial!