Skip to content

Commit

Permalink
Merge pull request #65 from mosteirodelandim/languags
Browse files Browse the repository at this point in the history
  • Loading branch information
LuchoTurtle authored Sep 15, 2023
2 parents e0c2118 + 363de75 commit 84a3784
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/components/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ function menuFlags() {
// Checking if location is undefined because browser globals are undefined before Gatsby building
// Only show flags when the user is not on the landing page
if (typeof location !== `undefined` && location.pathname !== '/') {
return null
return (
{/*
<div className="flags">
<div onClick={() => {
i18n.changeLanguage('pt');
Expand All @@ -26,6 +28,7 @@ function menuFlags() {
<FlagIcon code="gb"/>
</div>
</div>
*/}
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ i18n
.init({
resources,
detection,
fallbackLng: 'en',
fallbackLng: 'pt',

ns: ['landing', 'cta', 'notFound', 'sidebar', 'events', 'history', 'wine_vineyards', 'faq', 'about_us', 'gardens', 'photo_gallery'],
defaultNS: 'landing',
Expand Down
4 changes: 3 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ function IndexPage({data}) {
<LandingLayout fullMenu={false} showMenu={false}>
<section id="banner">
<div className="flag-container">
<div id="bannerFlags" className="flags">
{/*
<div id="bannerFlags" className="flags">
<div onClick={() => {
i18n.changeLanguage('pt');
window.location.reload();
Expand All @@ -47,6 +48,7 @@ function IndexPage({data}) {
<FlagIcon code="gb" />
</div>
</div>
*/}
</div>

<div>
Expand Down

0 comments on commit 84a3784

Please sign in to comment.