RuiVP Posted October 9, 2020 Share Posted October 9, 2020 My main.php template has <html lang="<?php echo _x('default', 'HTML language code'); ... > and it renders <html lang="default"> instead of <html lang="pt">. As a result, CSS specification {hyphens: auto} will not work. Any ideas how to solve this? Link to comment Share on other sites More sharing options...
MoritzLost Posted October 9, 2020 Share Posted October 9, 2020 The _x function is part of ProcessWire's translation system – using it is good practice, because it allows you to change hard-coded strings (such as the language code) through the backend without touching the code, and translate them to multiple languages for multi-language sites. You're probably just missing a translation. Go to Setup -> Languages -> Portugese (might also be default depending on your language setup), then under "Site Translation Files" check if the main.php is already listed, otherwise select it through "Find files to translate". Add the correct language code there and it should appear in your HTML! 3 Link to comment Share on other sites More sharing options...
RuiVP Posted October 9, 2020 Author Share Posted October 9, 2020 Right on the spot, @MoritzLost. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now