How to change schema markup language

#710069
  • Resolved Anonymous
    Rank Math free

    Hello! I am using Rankmath plugin on many of my websites and i am very much happy with it. However i came across some issues with it on one of my non-english sites.

    This is a non-english site for which i have added the relevant Hreflang tags. But in the schema markup generated by Rankmath, in the “inLanguage” attribute it still shows the es-US attribute which i don’t want.

    Is there any way to change it to my website main language.
    Thanks

    See the S.S: https://ibb.co/KscGmH0

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello, I apologize for the inconvenience you’re facing with the schema markup language in Rank Math on your non-English site. The “inLanguage” attribute in the schema markup is automatically added based on the language selected in the WordPress General Settings.

    If your desired language is not present in the list of available options, unfortunately, we cannot add it as the tag relies on the language options provided by WordPress. However, you can consider alternative solutions to meet your specific requirements or reach out to the Rank Math support team for further assistance.

    If you have any other questions or need further assistance, please feel free to get in touch with our support team directly from here: Rank Math Support. We’re always here to help you.

    Sources:
    Multilingual SEO with Rank Math SEO & WPML » Rank Math
    Why Are My Translated Pages Not in the Sitemap? » Rank Math

    Anonymous
    Rank Math free

    Certainly! The inLanguage attribute in schema markup generated by Rank Math is crucial for indicating the language of the content to search engines. To ensure the correct language is being represented in the schema markup, you might need to adjust a few settings within Rank Math or on your website.

    Here are steps you can take to change the inLanguage attribute:

    Language Settings in Rank Math:

    a. Go to your WordPress dashboard.
    b. Navigate to Rank Math > Titles & Meta > Local SEO (if you’re using Rank Math PRO) or Rank Math > General Settings > Local SEO (if you’re using the free version).
    c. Ensure that the correct language is selected for the website in the settings. You should see an option to set the website’s language.

    Check WordPress Settings:

    a. Go to Settings > General in your WordPress dashboard.
    b. Verify that the correct language is set in the ‘Site Language’ option.

    Hreflang Tags:

    a. Double-check that the hreflang tags in your site’s HTML accurately reflect the language and region codes for your non-English site. These tags should match the language specified in Rank Math’s settings.

    Validate Markup:

    a. After making changes, you can validate your website’s schema markup using Google’s Structured Data Testing Tool or the Rich Results Test. This will allow you to confirm whether the inLanguage attribute reflects the correct language after your adjustments.

    Cache and Reindex:

    a. Clear any caching plugins or services you’re using and request a reindex of your site by search engines. This ensures that the updated information gets recognized and reflected in search results. I also did the same for my client’s website.

    Remember to keep your plugins, themes, and WordPress core updated to ensure they function correctly and to patch any known issues related to the markup or language settings.

    Anonymous
    Rank Math free

    Thanks for the response! I am using Rankmath free but i coud not find the website language option in Local SEO tab. Infact there is no such option.

    Hello,

    Thank you for contacting us and bringing your concern to our attention.

    It seems like you’ve marked this ticket as resolved.

    Can you please confirm if you still need our assistance with this issue or anything else?

    However, please note that Rank Math uses the language property for your Schema from the Site Language in WP Dashboard > Settings > General. However, if you want, you can try to use the following filter on your website to change the inLanguage property of your schema:

    add_filter( 'rank_math/schema/language', function() {
        return 'en-US'; //change the language here
    } );
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Anonymous
    Rank Math free

    I’ve faced the same issue. After trying various solutions, I discovered that Rank Math ignores the language set in WordPress’ General Settings. Instead, it relies on the author’s language preference, which is configured under their profile. This can be problematic if the author or administrator setting up the WordPress site is not fluent in the website’s language.

    Hello @andreas-4897,

    The inLanguage property is fetched with either the filter we shared above or the data from the following function get_bloginfo('language') which is the language identifier of the website: https://developer.wordpress.org/reference/functions/get_bloginfo/

    If you are experiencing something different, open a new ticket with login details in the PRO section so we can check it further.

    We are going to close this ticket since the initial issue was resolved.

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)

The ticket ‘How to change schema markup language’ is closed to new replies.