📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
displaying current language in html lang
Blue Mousefc70faffa6ae
diff --git a/src/components/Title.jsx b/src/components/Title.jsxindex 33567a144..ae0bee4da 100644--- a/src/components/Title.jsx+++ b/src/components/Title.jsx@@ -1,5 +1,6 @@import React from 'react'import { Helmet } from 'react-helmet-async'+import { useTranslation } from 'react-i18next'import _isEmpty from 'lodash/isEmpty'import _map from 'lodash/map'import PropTypes from 'prop-types'@@ -7,6 +8,8 @@ import PropTypes from 'prop-types'import { TITLE_SUFFIX, whitelist } from 'redux/constants'const Title = ({ title, children }) => {+ const { i18n: { language } } = useTranslation('common')+if (_isEmpty(title)) {return (<>@@ -24,7 +27,10 @@ const Title = ({ title, children }) => {return (<><Helmet>+ <html lang={language} /><title>{displayTitle}</title>+ {/* <meta property='og:title' content={displayTitle} />+ <meta name='twitter:title' content={displayTitle} /> */}{_map(whitelist, (lang) => (<link key={lang} rel='alternate' hreflang={lang} href={`${pageURL}?lng=${lang}`} />))}