Hello,
Thank you for reaching out. The code snippet you provided is used to change the language in Rank Math schema output. In this specific case, the language is being set to ‘hi’. If you want to change the language to a different one, you can modify the ‘hi’ value in the code snippet to your preferred language code.
If you need further assistance or have any other questions, feel free to ask!
Sources:
Rank Math SEO Filters and Hooks for Developers – Rank Math
How to Make Your Theme Rank Math Compatible » Rank Math
WordPress Multilingual SEO With RankMath & Weglot @ RankMath
Hello,
Thank you for contacting us today.
Can you please confirm if you’re facing any issues with this filter? If so, please share some details with us so that we can check this further for you.
Looking forward to helping you.
Thank you.
I just want to know if this will change the language of the code schema or not
Hello,
Using that filter will modify the inLanguage
property value from the schema.
Looking forward to helping you.
Hi, is the only way to change language?
I’ve got a german language site, but it display “es” (instead of “de”) as inlanguage tag. as
Hello @info2002,
The plugin will take that information first from the language you set for your website but if that is not the actual language of the content you will need to use the filter we shared above.
Thank you.
Hello,
Yes, we are aware of that.
The previous message was for the user who asked about the same here: https://support.rankmath.com/ticket/rank-math-in-language-change/?view=all#post-838478
Thank you.
Hello @info2002,
We are glad we could be of assistance.
Please do not hesitate to let us know if you need our assistance with anything else.
Thanks.
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.