Translate the admin panel into your language
All the texts of the admin panel are stored in one file, so translating means copying that file and translating the right-hand sides.
Step by step
- Open the folder
VisitAnalytics/lang/. - Copy
en.phpto a new file named with your language code, for examplede.php,fr.phporbg.php. - Open the new file in a text editor (UTF-8!) and change the line
'_name' => 'English'to the name of your language, for example'_name' => 'Deutsch'. - Translate the text on the right side of every
=>. Do not change the words on the left (the keys). - Open Settings → General, choose your language and save. It also appears in the setup wizard.
Rules
- Keep placeholders such as
%sand%d; they are replaced by names and numbers ('online_now' => '%d online'). - Escape an apostrophe inside a text with a backslash:
'Don\'t'. - Texts you do not translate fall back to English, so a partial translation works.
months_shortandweekdays_shortare comma-separated lists of 12 and 7 abbreviations; translate them too, because charts use them.
Country names
Copy lang/countries_en.php to lang/countries_de.php (same code as your language file) and translate the names. Missing names fall back to English.
Sharing your translation
A language file is a single PHP file, so it survives updates (Updating and uninstalling VisitAnalytics): just keep your file in the lang folder when you upload a new version.
Last updated