Schema Language Not Updating to da_DK in Rank Math

#960679
  • Resolved Kasper Jensen
    Rank Math free

    Hello Rank Math Support,

    I am experiencing an issue where my website’s Schema language remains set to en instead of da-DK, despite making several changes to my WordPress settings.

    What I’ve Done So Far:
    Changed WordPress site language to Danish (da-DK) via Settings → General.
    Updated functions.php to force switch_to_locale(‘da_DK’);.
    Manually added <html lang=”da-DK”> in header.php, which correctly reflects in the page source.
    Added filters in functions.php to modify Rank Math’s OpenGraph and JSON-LD schema language to da-DK.
    Cleared cache and ran a fresh test in incognito mode, yet the Schema markup (JSON-LD) still displays “inLanguage”: “en”.
    Checked Rank Math settings but could not find an option to override Schema language manually.
    Rebuilt Rank Math’s database index and recalculated SEO scores under Status & Tools.
    Issue:
    Despite these efforts, the Schema JSON-LD still outputs “inLanguage”: “en” instead of “da-DK”. This is affecting my structured data for Google, as I need it to correctly reflect Danish for local SEO.

    What I Need Help With:
    Is there a setting in Rank Math to manually set the Schema language?
    Does Rank Math override the WordPress language setting for Schema?
    How can I ensure “inLanguage”: “da-DK” is properly reflected in Schema markup?
    Looking forward to your guidance!

    Best regards,
    Kasper

Viewing 1 replies (of 1 total)
  • Hello,

    We apologize for the issue you are facing with the Schema language not updating to da-DK in Rank Math. Thank you for providing detailed information about the steps you’ve taken so far.

    To address your questions:

    1. Setting Schema Language Manually: Currently, Rank Math does not have a specific setting to manually set the Schema language. It typically fetches the language from the WordPress General Settings.
    2. Override of WordPress Language Setting: Rank Math does rely on the language options provided by WordPress. If your desired language (da-DK) is not reflected in the Schema markup, it may be due to how Rank Math interprets the language settings.
    3. Ensuring Correct Language in Schema Markup: Since you’ve already made changes in your WordPress settings and functions.php, it seems like you’ve covered most bases. However, if the language is still not updating, it might be beneficial to check if there are any conflicts with other plugins or themes that could be affecting this.

    If the issue persists, we recommend replying to this ticket, and a human agent from the Rank Math Support team will take over and provide further assistance.

    Thank you for your understanding, and we hope to resolve this issue for you soon!

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Schema Language Not Updating to da_DK in Rank Math’ is closed to new replies.