How to change polylang flag?

Asked by At

I need different flag for languages.

It is possible to use your own images as flags. You have to use PNG or JPG files and name them with the WordPress locale. For example, en_GB.png. Then upload this file in the /wp-content/polylang/ directory (create the directory if it does not exist). Don’t use the /polylang/flags/ directory as your file would be removed when automatically updating the plugin.

Once the custom flag is uploaded, go in Languages > Settings > URL modifications module then click on save changes. Note that your custom flags are not used on admin side.

I did all of this but the language switcher have the same flags... I don't see how the plugin would recognize that if I place an en_GB.png file in its directory (Not the flags folder). Feels like they miss something important, how to assign the images to certain language...

1 Answers

0
Community On

Yes. You can use PNG, JPG or even SVG files and name them with the WordPress locale. For example, en_US.png.

Upload these files in the /wp-content/polylang/ directory.

Note: You have to create the directory yourself. Don’t use the /polylang/flags/ directory as your files would be removed when automatically updating the plugin. Alternatively, it’s possible to store the files in the /polylang/ subdirectory of the theme or the child theme.

Once the custom flags are uploaded, go to Languages > Settings. Click on the “URL modifications” settings and then on Save Changes.