Declaring language in HTML Topic is solved

General questions regarding the use of languages in Joomla! 3.x.

Moderators: infograf768, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
jacksprat
Joomla! Explorer
Joomla! Explorer
Posts: 267
Joined: Sun Jun 08, 2008 7:46 pm

Declaring language in HTML

Post by jacksprat » Sat Jan 12, 2019 5:08 pm

How do I set language to English in HTML for my Website and/or documents?

User avatar
AMurray
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4675
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Declaring language in HTML

Post by AMurray » Sat Jan 12, 2019 11:17 pm

In Joomla, the default language is english - so nothing needs to be set. But.....the way to do it would be something like:

Code: Select all

<html lang="en">
More info here: https://www.w3.org/International/questi ... clarations
Regards,
--------------------------------------------------------------
A Murray
Millennium Falcon - it's the ship that made the Kessel run in less than 12 parsecs! The fastest hunk of junk in the galaxy.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18812
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Declaring language in HTML

Post by infograf768 » Sun Jan 13, 2019 6:25 am

The Joomla core default templates use:

Code: Select all

<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
etc.
Where $this->language corresponds to the language used.
For example, French will give:

Code: Select all

<!DOCTYPE html>
<html lang="fr-fr" dir="ltr">
<head>
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group


Post Reply

Return to “Language - Joomla! 3.x”