Skip Navigation
Updated
June 19, 2023

WPML allows your website to display different favicons in secondary languages using String Translation.

WordPress lets you add a unique touch to your website with favicons and customizable theme options like templates, headers, footers, and more.

To translate your favicon, you’ll need to set a favicon for your site. You’ll also need to upload the image you would like to use as your secondary language favicon to the Media Library. When you upload it, make a note of the item number that appears in the URL. In the example below, it’s 594.

Viewing the favicon in default and secondary languages
Finding the item number of your secondary language favicon

Once you have the item number of the secondary language favicon written down, you’ll need to register the original favicon as translatable.

  1. Go to WPML → String Translation and click on Translate texts in admin screens at the bottom of the page.
Viewing the favicon in default and secondary languages
  1. Search for site_icon and add it to String Translation. You’ll notice that the value of the string is a number. This is the item number of your default language favicon. Click Add to String Translation to send it to the main String Translation screen.
Viewing the favicon in default and secondary languages
Registering the favicon string as translatable
  1. Find the string on the String Translation page and translate it. For the translation, use the item number of your secondary language favicon.
Viewing the favicon in default and secondary languages
Translating the favicon string by entering the item number for your secondary language favicon

You’ll now have a new favicon that displays when viewing your site in your secondary language.

Viewing the favicon in default and secondary languages
Viewing the favicon in default and secondary languages