How to disable a skin or skin language
If you wish to hide a skin or a language, you can now create a
.disabled file in the relevant directory, e.g.,
Disable/Hide a skin:
Disable/Hide a language:
where the presence of the
.disabled file will cause it to be excluded from the list.
Custom variable in skin.conf
You can add a new variable to the
skin.conf file, e.g.,
This setting allows you to control the output of the 404 pages by instead, sending a specific page with the data set in the desired file (e.g., user/404.html, can be changed).
This file is tokenized similar to an HTM_ file.
Note, the FileManager is chrooted, so if you trigger a 404 for a file that does not exist, you'll still get the old format because the 404_override file is loaded after the chroot has already happened.
Also, a new optional file in the skin document root has been added:
which will list valid paths that will return 200 instead of 404 for the 404_override file.
Intended purpose is for Vue-router / JS framework to redirect things like:
to valid places via JS using the 404_override file.
The same file is sent regardless of the
routes.conf list, but the list simply controls if it's a http 200 or 404 response code.
routes.conf supports wildcards, similar to the shell (but cannot cross / character, as in cross over into a new directory).
but will not match:
Causes the internal Table class to generate
<div> output instead of
Translating internal strings: gettext
As of DirectAdmin 1.61.1, the binaries will support gettext, for better internationalized string translations.
The path for your language will be at:
DirectAdmin automatically convert the .po to the binary internal.mo version (and update when needed) upon the first load of the internal.po.
The auto-conversion requires the presence of
/usr/bin/msgfmt so if you do not have it, install it with:
yum install gettext
- To create your
internal.po, first take the default which should be found in:
and copy it to a temporary location for translation.
The translation involves going through each msgid string, and swapping with the correct string for the new given language.
Some msgids will have flag characters such as %s and %d, which are used to place dynamic string/number into. The number and order of these flags must remain intact, else the translation will not work.
Some phrases can be singular or plural. These cases have "msgid_plural" below the msgid. The singular translation goes into msgstr and the plural set beside msgstr.
Once you have your translated internal.po file, save it to the path listed at the top of this guide.
#, c-format msgid " and %d User" msgid_plural " and %d Users" msgstr "" msgstr ""
Say you were to translate this into a french
lang/fr/LC_MESSAGES/internal.po, the given result may look like:
#, c-format msgid " and %d User" msgid_plural " and %d Users" msgstr "et %d Utilisateur" msgstr "et %d Utilisateurs"
where DirectAdmin would internally swap the %d flag with a dynamic number that can change depending on the output.
With each new release of DirectAdmin, there are likely going to be new or changed translations. To add the new translations to your
.po file without losing your existing translations, use the command:
msgmerge --update "/usr/local/directadmin/data/lang/fr/LC_MESSAGES/internal.po" /usr/local/directadmin/data/lang/internal.pot
- Check the language of the User fred:
grep "fr" /usr/local/directadmin/data/users/fred/user.conf
- Ensure the
internal.mowas created, as DA itself needs the .mo from the .po file:
ls -la "/usr/local/directadmin/data/lang/fr/LC_MESSAGES/internal.mo"
If it does not exist, convert it from the .po to see what's going on:
/usr/bin/msgfmt "/usr/local/directadmin/data/lang/fr/LC_MESSAGES/internal.mo" -o "/usr/local/directadmin/data/lang/fr/LC_MESSAGES/internal.po" chown diradmin:diradmin "/usr/local/directadmin/data/lang/fr/LC_MESSAGES/internal.mo"
Debugging the binaries
Ensure that gettext is compiled in:
cd /usr/local/directadmin ./directadmin o
We want to see this in the output:
gettext support: yes gettext path: /usr/local/directadmin/data/lang
Beyond that, running DirectAdmin in debug mode exactly level 735 will yield information which can be sent to DirectAdmin support for investigation.