Resolving the 'Language Not Supported' Error for Norwegian (Norsk) in Google for WooCommerce
Content
Users of the Google for WooCommerce plugin (formerly Google Listings & Ads) have reported encountering an error when their site language is set to Norwegian, specifically 'Norsk (bokmål)'. The plugin displays a message stating, "This language is currently not supported by Google Listings & Ads." This article explains the cause of this bug and outlines the current solutions available.
Understanding the Problem
The error occurs due to the way the plugin checks for supported languages. It uses the first two letters of the site's language code to perform its validation. For most languages, this works correctly. For example, German uses the language code de_DE, and the plugin correctly identifies DE.
However, the language code for Norwegian (bokmål) is nb_NO. The plugin incorrectly tries to find the country code in the first two letters (nb) instead of the last two letters (NO), which is what it expects. Since nb is not on its list of supported languages, it throws the unsupported language error.
Official Status and Workarounds
The development team behind Google for WooCommerce has confirmed this is a known bug. An open issue exists on their GitHub repository to improve language support. While an official fix is in development, users have found a couple of workarounds.
Solution 1: Temporary Language Switch (Recommended)
The simplest and safest workaround is to temporarily change your site's language to English (United States) to complete the initial plugin setup and connection. After the connection is established, you can switch your site language back to Norwegian. This often allows the plugin to continue functioning normally.
- Navigate to Settings > General in your WordPress admin.
- Change the Site Language to English (United States).
- Save changes.
- Complete the setup and connection process for Google for WooCommerce.
- Once connected, you can return to the General settings and change the language back to Norsk (bokmål).
Solution 2: Code Modification (For Developers)
Warning: This solution involves editing plugin source code. Any changes made will be overwritten and lost when the plugin is updated. This method is only recommended for developers on a testing site and is not a permanent fix.
As identified by the community, the issue is within two functions in the src/GoogleHelper.php file: get_mc_supported_languages() and get_mc_supported_countries_currencies(). The fix involves adding the language code NB to the arrays in both functions.
Again, this is a temporary developer workaround and not a general user solution, as it will be reversed with the next plugin update.
Looking Forward
Since this bug is already tracked by the plugin's developers, an official patch is expected in a future update. The fix will likely involve improving the language validation logic to properly handle all WordPress locale codes. Users experiencing this issue should monitor the official GitHub issue for updates and the eventual release of the permanent fix.
Related Support Threads Support
-
Bug for norwegian languagehttps://wordpress.org/support/topic/bug-for-norwegian-language/