wordpresscookiestranslationlanguage-translationcookieyes

How to combine CookieYes with TranslatePress in WordPress?


so i am using Wordpress and need to create cookie manager. I am using CookieYes. My webiste also supports 2 lanugages (serbian and english). For translations i am using TranslatePress. I added languages to CookieYes

enter image description here

I know CookieYes switches languages based on lang property in html tag so i created 2 custom languages in my TranslatePress plugin to match language codes from CookieYes:

enter image description here

Now, if i switch languages, lang property for my html tag matches the one from CookieYes, but the language in cookie banner is always in Serbian.

This is default language:

enter image description here

And when i select English, i get this:

enter image description here

enter image description here

And my translations work, but my cookie banner and manager is still in default Serbian.

I don't know what is happening, my lang tag matches the ones from CookieYes but banner is always in Serbian.

Please help!!!


Solution

  • So after creating account on cookie yes, i noticed that language codes there are not in caps lock. I changed the code in my custom languages in TranslatePress to be lower case and it works.