Icon made by Freepik from www.flaticon.com
Ever since I started using BirdNET-Pi several years ago, I have adapted the appearance to my own wishes. One of the most important customizations has been to have the different pages in my own language. I have shared this adaptation with others in Sweden, and now I have further developed it so that a single command is all that is needed to do everything required to customize BirdNET-Pi. Perhaps more people are interested?
- Multilingual Customization: Translation of all public pages (that do not require a login) into another language.
- Dynamic Page Title: The name of your installation location can easily be inserted into the page title.
- National Flag: Your own national flag can be added to the page title.
- Flexible Space: The space under the title is flexible, which makes it possible to add local information, such as weather.
- Customized Wikipedia Links: Wikipedia links are automatically changed to your chosen language.
All that is required is for you to run a single command the first time. After that, a convenient update button is available under "System Controls" on the BirdNET-Pi interface.
The update only takes 30-45 seconds. If the customization is done on an old installation with a large database, the update will take a few minutes. The entire installation is downloaded again with each update (git pull -f is specified), and then it is modified from scratch, with the exception of the index.php file and some other custom files. A Translate folder is downloaded locally and contains all files, commands, and necessary tools, so that you can make changes and run the routine locally if needed. If you use this folder, the program with updates is still downloaded, but the customization routine itself is not updated.
Translations into other languages have been made with AI and will likely require some adjustments. I hope that a volunteer from each country can help with this.
Please read more in the information files listed above.
The modification can be installed with the following commands, one for each country. If there is a request for translation for more countries, I can also try this.. Be sure to replace the text "Enter your location here" with the location you want in the title. This command is only run once on an unmodified installation. Subsequent updates can be made from "System Controls" in the Tools menu.
If you want to go back to the original look, it's very easy, just click the regular "Update" button.
Sweden
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/sweden/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
France
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/france/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Slovenia
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/slovene/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Netherlands (Dutch)
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/nederland/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
The following countries can be installed, but the translation is not yet verified and may contain some errors.
Norway
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/norway/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Denmark
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/denmark/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Finland
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/finland/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Germany
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/germany/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Italy
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/italy/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Spain
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/spain/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Poland
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/poland/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Czechia
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/czechia/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Slovakia
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/slovakia/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Hungary
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/hungary/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
Portugal
cd ~/BirdNET-Pi && wget -O nyinstallation.sh https://raw.githubusercontent.com/Svardsten53/Translate/main/portugal/nyinstallation.sh && sudo chmod u+x nyinstallation.sh && dos2unix nyinstallation.sh && sed -i '/export PLATS=/d' ~/.bashrc && echo 'export PLATS="Enter your location here"' >> ~/.bashrc && source ~/.bashrc && bash nyinstallation.sh
A JavaScript-based internationalization (i18n) system for BirdNET-Pi that translates the web interface without modifying core PHP files.
| Feature | sed-based approach | i18n.js |
|---|---|---|
| Modifies PHP files | Yes (250+ sed commands) | No (only 2 lines added) |
| Survives BirdNET-Pi updates | No (must re-run everything) | Yes (just run update.sh) |
| Adding a new language | Complex shell scripting | Simple: add a JSON file |
| Community contributions | Difficult | Easy: edit JSON |
| Reverting changes | Difficult | Easy: run uninstall.sh |
| Language | Code | File |
|---|---|---|
| English | en |
(default, no file needed) |
| Nederlands (Dutch) | nl |
nl.json |
| Svenska (Swedish) | sv |
sv.json |
| Deutsch (German) | de |
de.json |
| Français (French) | fr |
fr.json |
| Polski (Polish) | pl |
pl.json |
| Suomi (Finnish) | fi |
fi.json |
| Dansk (Danish) | da |
da.json |
# Clone the repository
cd ~
git clone https://github.com/Svardsten53/Translate.git
# Run the installer
cd Translate
chmod +x scripts/*.sh
./scripts/install.shThe installer will:
- Copy the
i18n/folder to your BirdNET-Pi installation - Add two script tags to
index.phpandviews.php - That's it!
After installation, set your language in one of these ways:
- URL parameter (temporary):
http://your-birdnet-pi/?lang=nl - Browser settings: The system detects your browser language automatically
- Permanently: Add
?lang=nlto your bookmark, or the system remembers your last choice
When BirdNET-Pi updates, it may overwrite the script tags. Simply run:
cd ~/Translate
./scripts/update.shThis only takes a second and re-adds the 2 script tags. Your translations remain intact.
To completely remove the i18n system:
cd ~/Translate
./scripts/uninstall.shThe system uses client-side JavaScript to translate text:
- On page load: Loads the JSON translation file for your language
- Scans the DOM: Finds all text nodes and replaces English text with translations
- Watches for changes: Uses MutationObserver to translate dynamically loaded content (AJAX)
- Works in iframes: BirdNET-Pi uses iframes; the script works in both parent and child frames
- No server changes: All translation happens in the browser
- Fast loading: Translation files are cached
- 500+ translations: Covers all UI elements, menus, buttons, messages
- Pattern matching: Handles dynamic text like dates and numbers
To change the default language, edit the config file:
nano ~/BirdNET-Pi/i18n/config.jswindow.BIRDNET_I18N_CONFIG = {
defaultLang: 'nl', // Your language code
debug: false
};-
Copy an existing language file:
cp i18n/langs/nl.json i18n/langs/es.json
-
Edit the new file and translate the strings:
{ "meta": { "language": "es", "name": "Español", "version": "1.0.0" }, "translations": { "Overview": "Resumen", "Today's Detections": "Detecciones de Hoy", ... } } -
That's it! The new language is automatically available with
?lang=es
Translate/
├── i18n/
│ ├── i18n.js # Main translation engine
│ ├── config.js # Configuration (language settings)
│ └── langs/
│ ├── nl.json # Dutch
│ ├── sv.json # Swedish
│ ├── de.json # German
│ ├── fr.json # French
│ ├── pl.json # Polish
│ ├── fi.json # Finnish
│ └── da.json # Danish
├── scripts/
│ ├── install.sh # Installation script
│ ├── update.sh # Re-adds script tags after BP update
│ └── uninstall.sh # Remove i18n system
└── README.md
Contributions are welcome! You can help by:
- Improving translations: Fix errors in existing language files
- Adding languages: Create a new JSON file for your language
- Testing: Report issues or missing translations
- Keep the exact format of dynamic text (e.g.,
{0}placeholders) - Test your translations on a live BirdNET-Pi installation
- Some technical terms may be better left in English
- Lars Svardsten - Original sed-based translation system and Swedish translations
- Ronny - JavaScript i18n engine development
- BirdNET-Pi Team - The amazing bird detection software
This project is provided as-is for the BirdNET-Pi community.
Icon made by Freepik from www.flaticon.com
