Skip to content

Commit

Permalink
fix: use full language codes
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander committed Jan 8, 2025
1 parent 791a803 commit d3d9d18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ lang if lang else defaultLanguage }}" dir="ltr">
<html lang="{{ lang if lang else defaultLanguage }}-CA" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand Down
4 changes: 2 additions & 2 deletions src/_includes/partials/global/header.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<div class="header__settings">
<ul class="header__language" role="list">
<li>
<a href="{{ page | findTranslation(collections.all, lang, 'en') }}" lang="en" hreflang="en"{% if lang == 'en' %} aria-current="page"{% endif %}><span class="lg-hidden">EN</span><span class="lg-inline">English</span></a>
<a href="{{ page | findTranslation(collections.all, lang, 'en') }}" lang="en-CA" hreflang="en-CA"{% if lang == 'en' %} aria-current="page"{% endif %}><span class="lg-hidden">EN</span><span class="lg-inline">English</span></a>
</li>
<li>
<a href="{{ page | findTranslation(collections.all, lang, 'fr') }}" lang="fr" hreflang="fr"{% if lang == 'fr' %} aria-current="page"{% endif %}><span class="lg-hidden">FR</span><span class="lg-inline">Français</span></a>
<a href="{{ page | findTranslation(collections.all, lang, 'fr') }}" lang="fr-CA" hreflang="fr-CA"{% if lang == 'fr' %} aria-current="page"{% endif %}><span class="lg-hidden">FR</span><span class="lg-inline">Français</span></a>
</li>
</ul>
</div>
Expand Down

0 comments on commit d3d9d18

Please sign in to comment.