i18n working
This commit is contained in:
parent
0a29599833
commit
af743859ce
2 changed files with 7 additions and 3 deletions
5
i18n.js
5
i18n.js
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue