i18n working

This commit is contained in:
Sean Yesmunt 2021-03-29 10:09:11 -04:00
parent 0a29599833
commit af743859ce
2 changed files with 7 additions and 3 deletions

View file

@ -1,5 +1,4 @@
export const m = {
faq: 'faq',
help_lbry: 'help_lbry',
save_crypto: 'save_crypto',
go_home: 'go_home',
@ -107,7 +106,9 @@ const en = {
donate_subtitle: 'If you want to go far, go together.',
};
const es = {};
const es = {
// landing_action: '...',
};
const languages = {
es,

View file

@ -1,5 +1,7 @@
import React from 'react';
import Image from 'next/image';
import { useRouter } from 'next/router';
import { Header } from '../component/header';
import { Twitter } from '../component/twitter';
import { Email } from '../component/email';
@ -7,7 +9,8 @@ import { t, m } from '../i18n';
import { tracker } from '../analytics';
export default function Home() {
const lang = 'en'; // req.query.lang || 'en'
const router = useRouter();
const lang = router.query.lang || 'en';
React.useEffect(() => {
tracker.trackPageView();