Personalizing Pi3D PictureFrame: How to localize your photo geodata in any language

Pi3D PictureFrame includes a wonderful feature that displays the location where a photo was taken.

Instead of hardcoding the location information, the Exif data in the photo contains only longitude and latitude. A reverse geocoding web service translates these coordinates into names of countries, cities, streets, and more.

Geocoding services like Nominatim (used by PictureFrame), Geoapify, Geonames, or Google’s Reverse Geocoding API provide this information in various languages.

In PictureFrame’s configuration.yaml file, you can set the language for retrieving geoinformation. The location details are then gradually added to the pictureframe.db3 file, so the data doesn’t need to be retrieved again each time the photo is displayed.

By default, PictureFrame uses English, but you can change the language if needed. However, a few additional steps are required.

Installing locales

The OS Bookworm includes localization options for approximately 250 languages, including regional variants.

Open a terminal and type:

sudo dpkg-reconfigure locales

Scroll to the language you want to add. Select it by pressing the spacebar, ensuring you pick the country-specific variant (e.g., fr_CA.UTF-8 for Canadian French).

In the following dialogue, set it as your default language. The locales will then be generated.

At this point, I thought I had done everything, but the locales weren’t generated as they should be.

So here is what I did to fix it:

Edit the locale configuration file:

sudo nano /etc/default/locale

Ensure it contains the following lines for your chosen language:

LANG=fr_CA.UTF-8
LC_CTYPE="fr_CA.UTF-8"
LC_ALL="fr_CA.UTF-8"

In my case, the last two lines were missing. Add them if necessary.

Apply the local settings with:

export LANG="fr_CA.UTF-8"

export LC_CTYPE="fr_CA.UTF-8"

export LC_ALL="fr_CA.UTF-8"

Verify the settings by typing:

locale

The output should look similar to this:

LANG=fr_CA.UTF-8
LANGUAGE=
LC_CTYPE="fr_CA.UTF-8"
LC_NUMERIC="fr_CA.UTF-8"
LC_TIME="fr_CA.UTF-8"
LC_COLLATE="fr_CA.UTF-8"
LC_MONETARY="fr_CA.UTF-8"
LC_MESSAGES="fr_CA.UTF-8"
LC_PAPER="fr_CA.UTF-8"
LC_NAME="fr_CA.UTF-8"
LC_ADDRESS="fr_CA.UTF-8"
LC_TELEPHONE="fr_CA.UTF-8"
LC_MEASUREMENT="fr_CA.UTF-8"
LC_IDENTIFICATION="fr_CA.UTF-8"
LC_ALL=fr_CA.UTF-8

Changing the language in PictureFrame

Open configuration.yaml and locate the following line:

  locale: "de_DE.utf8"  # "locale -a" shows the installed locales which could used

Replace “de_DE.utf8” with your language code.

Save and close the file.

Deleting the database

The last step is to delete the database so that the geolocation can be retrieved freshly in your chosen language.

Navigate to the following directory

/home/pi/picframe_date/data

and delete the file

pictureframe.db3

This can be done while PictureFrame is running.

Reboot your system and verify that the locations are now displayed in your selected language.

Conclusion

The ability to set the geodata language is another great detail of Pi3D Picture Frame. Now you know how you can make it even more personal.

Was this article helpful?


Thank you for your support and motivation.


Scroll to Top