On this page
With the Automatic User Language Detection Add-on activated, users will be presented with a pop-up offering the option to select their preferred language.
First-time visitors can choose their language based on their browser settings or IP address. This preference is saved in a cookie, ensuring that the website loads in the previously selected language when they return. However, if the user decides to change the language during future visits, the pop-up will reappear to confirm their language choice.
The Automatic User Language Detection Add-on is available with TranslatePress Business and Developer licenses.
After purchasing a premium version of TranslatePress, follow this guide to install TranslatePress.
Once TranslatePress is installed, go to Settings → TranslatePress in your WordPress dashboard, then navigate to the Addons tab.

Scroll down to the Automatic User Language Detection Add-on and Activate it here.

You can find the add-on settings under Settings → TranslatePress → Advanced, in the Automatic User Language Detection section.

You can choose which method should be used for language detection by selecting one of the following options under TranslatePress → Advanced Settings → Automatic User Language Detection → User Language Detection Method: the user’s browser language setting, or their IP address.
Selecting the option First by browser language, then IP address will consider the user’s browser language setting. If it doesn’t match any of the site’s available languages selected in TranslatePress settings, then the IP address of the user will be used to determine their preferred language. If this doesn’t match any of the available languages either, then the default language will be displayed to the user or, if the option Use subdirectory for the default language is set to Yes, the first language in the Translation Languages option.
Similarly, selecting the option First by IP address, then browser language will determine the language by IP and if that fails then browser language is considered.
Selecting Only by browser language or Only by IP address will not have a fallback user language detection method.

The visitor’s IP address is searched in the GeoLite2 database to determine the country from which the user accessed the website. The country is then searched in the locales code of the selected translation languages in TranslatePress Settings.
This product includes GeoLite2 data created by MaxMind.
The pop-ups notify the user when a different language is detected by the Automatic User Language Detection add-on, and suggest switching to it.

All the text appearing in the pop-ups is added dynamically and can be changed under TranslatePress → Advanced Settings → Automatic User Language Detection, in the Popup Content section. As shown in the image, the Popup Text, Button Text, and Close Button Text can each be easily changed to something else, and the modifications will be visible in the pop-ups.
The text is also not affected by automatic translation. If you would like the text to appear in a different language, you can change it to any language you wish to display inside the pop-ups.
We have two types of pop-ups available to use, which can be chosen from the Popup Type option. The available pop-ups are a Pop-up window over the content and a Hello bar before the content. Any changes made to the text appearing in the pop-up, the change-language button, and the close button will be reflected on both of these designs.


The pop-up window is the best choice available for notifying the user about a different detected language. The language switcher appended to the pop-up will show the detected language inside the closed language switcher. If the user wants to be redirected to the detected language, they will click the Change Language button and be redirected. The language cookie will be changed so the pop-up is not shown again on different pages. The pop-up window stays at the top of the page while scrolling and while it is opened the content available on the pages can still be seen or clicked.
As mentioned before, all the text shown in the pop-up depends on the text chosen in the settings, and can be changed.
If the user wants to be redirected to a different language available on the website, they can do so by opening the language switcher and choosing a different language. Just as with the detected language, the language cookie is changed to the chosen language, and the pop-up will not appear again.

There is also the option to just close the pop-up without switching languages.

The Hello Bar is displayed before the content. It has a similar design to the pop-up window but, because it is displayed before the content, it will not remain at the top of the page while scrolling.
As the pop-up window, the Hello Bar has a language switcher appended that lets the user choose from all the languages available on the website. The language displayed when the language switcher is closed is the one detected by the add-on.
Similar to the pop-up, the text appearing inside the Hello Bar can be changed from the settings. Make sure to test how the Hello Bar is displayed in the front-end. Themes and other plugins may also have elements in the same place so it’s best to check how these interact.
Both designs of pop-ups are responsive and will adapt well to changes in window size or on mobile phones.

This option allows you to control which languages the pop-up appears for. When it is turned on, two additional controls become available:

The Automatic User Language Detection pop-up includes a visual configurator that allows you to customize the design. You can change the wording, colors, borders, entrance animation, and the language selector inside the pop-up, and preview every change live before saving it. You’ll find it in Settings → TranslatePress → Advanced, in the Automatic User Language Detection section.

This box controls the language selector that sits inside the pop-up, next to the Change Language button. The options match those available for the regular shortcode language switcher. The box is collapsed by default – click it to open it.
From here, you can set how the Language names appear (Full names, Short names, or No names – flag only), turn the flags on or off with Show flags, and adjust the Flag shape and Flag border radius. You can also customize the Switcher background and Switcher hover background, the Switcher text and Switcher hover text, and the Switcher border, along with its Switcher border width and Switcher border radius.

This box controls the look of the pop-up itself. It is collapsed by default.
The first group styles the pop-up box: Background color, Text color, Close icon color, Border color, Border width, Border radius and Overlay color.
Overlay color sets the dimmed layer behind the pop-up. It is only shown when the pop-up type is Pop-up window over the content, because the hello bar doesn’t have an overlay.
The second group styles the button: Button background color, Button hover color, Button text color and Button border radius.
Finally, Entrance animation turns the opening animation on or off. When it’s on, the Animation dropdown lets you pick between Fade, Slide from top, Slide from right, Slide from bottom and Slide from left.

If you would like to add customizations that the options above do not cover, you can turn on Enable custom CSS to reveal a CSS editor where you can add your own styling.

Redirect Directly (!DEPRECATED)
This change was made because such automatic redirects can cause indexing and SEO issues with Google. The crawlers access your website from various IP addresses and languages, and there’s no consistent way to determine how these redirects would impact your site’s indexing.
Google also frequently updates its algorithms, making automatic redirection behavior unpredictable and potentially harmful for SEO.
You can use Google Webmaster Tool to see how your site is indexed. Also, we recommend reviewing your index status from Webmaster Tool periodically.
One of the best methods to show your users that you have content in their language is to place a language switcher on your site.
Another way could be to first ask your users about the language that they prefer through a welcome page and then show them relevant content in that language.
Get Automatic User Language Detection Add-on