Jump to content

languages in the html


RuiVP
 Share

Recommended Posts

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

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!

  • Like 3
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...