This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: Exception
This topic contains 3 replies, has 2 voices.
Last updated by Prosenjit Barman 1 year, 1 month ago.
Assisted by: Prosenjit Barman.
Author | Posts |
---|---|
October 13, 2023 at 10:35 am #14572165 | |
anil-kumarS |
The current href lang is nl-nl for Netherlands and fr-be for belgium, I want it to be shown as nl-NL and fr-BE, In settings, last 2 letters are already capital,but website is rendeing in all small letter, I have attached a screenshot where you can see the hfrelang settings Is it possible to make last 2 letters capital? If no, Why? If yes, What can be the solution ? |
October 16, 2023 at 7:39 am #14581725 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, I understand what you're looking for. According to Google's specifications, both language and region codes should be lowercase for `hreflang` annotations. That's why, country code(after language code) in hreflang appears in smallcase. The `hreflang` value "nl-nl" or "fr-be" is technically correct and should work. Many websites and systems use the mixed case format (e.g., "fr-BE") with the country code in uppercase. Google, being aware of the common practice, has made its algorithms flexible enough to understand and accept both formats. In summary, while "nl-nl" or "fr-be" is technically more in line with Google's guidance, "fr-BE" is also widely accepted and should work without issues. If you're starting from scratch, you might consider using the all-lowercase format just to align with Google's guidance. But if you already have "fr-BE" in place, it's not required to change it. I hope this explanation helps. Feel free to let me know if you need any further assistance. I will be happy to help. Best regards, |
October 16, 2023 at 9:29 am #14582907 | |
anil-kumarS |
Ok, but still, I want that to be shown as last 2 letters capital, When I'll check source code, it should appear like fr-BE & nl-NL I know google accepts both, but I want this format only |
October 17, 2023 at 3:43 am #14589547 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hi There, I understand your preference, but unfortunately, it is something not possible at the moment. WPML is configured to render the hreflang attribute in lowercase only as it is recommended. While both uppercase and lowercase are recognized by search engines, if you could provide a specific reason for preferring the country code to render in uppercase for Hreflang, I'd be happy to forward it to our team for further review. I hope you can understand. If you have any other questions or need further assistance, please let me know. I'll be happy to help. Best regards, |