Mat
(@mateithemeisle)
Hello @tippl ,
Thank you for using Otter and for reaching out!
In order to be able to translate those you could try another translation plugin like WPML for example or in case you want it to be done without any additional plugins, we can apply some CSS tricks that will allow you to display the text you desire instead.
Here is an example of code that could work for you too, although it might need some adjustments depending on the exact class that is impacted. In my case, I changed the subscribe button to “My text appears here” in the form.
button.wp-block-button__link {
font-size: 0;
}
button.wp-block-button__link:after {
font-size: 14px !important;
content: "My text appears here";
}
What this code does is it shrinks the original text to 0, then it adds after it your new text. Since the original text is now 0 in size, the fact that you added new text after it will not impact margin/padding etc.
Thank you and please let us know if this worked for you!
thank you for your answer. But wouldn’t it be better to get to the bottom of the issue? Strings at the frontend should be translatable without using css tricks.Why do the .pot files differ so much in the amount of strings?
–> 1,018 strings: https://translate.wordpress.org/projects/wp-plugins/otter-blocks/dev/de/default/
–> 108 strings inside the .pot file of the otter blocks plugin
Where are the remaining strings?
Thanks
Hey @tippl,
Strings are already translatable but given how Block Editor works, they aren’t easily translatable just by editing the pot files.
You can use a plugin like WPML to translate all strings in Otter to your own language.
Or, the more painful way, is to get 90%+ strings translated and approved here: https://translate.wordpress.org/projects/wp-plugins/otter-blocks/dev/de/default/
Block Editor is pretty much JavaScript based so it’s harder to translate client-side loaded text than to translate PHP code.
Hope it makes more sense.