Change the text in css pseudo ::after/::before content (Christian's way) : Base on language.
- By
- John Doe
- Sept 17, 2024
- 7 min read
Short Intro:
- Multiple language site is not new in wordpress. Wordpress has a number of plugin that can translate your whole site in just a few clicks. There are some strings that the plugin aren't capable due to its limitation such as text that is in pseudo code.
Problem:
The problem is the plugin like translatepress isn't capable of translating text in pseudo code. Most of this text can be found in the buttons.
Solution:
This solution is somehow will help you to translate some strings by taking advantange of "lang" attribute that can be found in the html element.
The value of this attribute will be changed depending on which language is currently using by the site. We can target the specific element by using element targeting in css. To target the html with the attribute of "lang", just put [lang="value of the language you would like to target"]
Contact details
More solutions
by ilias
You're using JetFormBuilder and want to make sure users are at least 18 years old based on their birthday input.
by ilias
Roweij Spices wanted to have a filter that can choose number of products display per pagination
by ilias
This article will show you how to add dynamic code to your templates using the Elementor Shortcode widget and custom PHP code.

