Commit f0e2faa8 authored by Elisabeth Reuhl's avatar Elisabeth Reuhl
Browse files

Changed i18n example into PageHeader component

parent bdd40116
import React from 'react';
import { useTranslation } from 'react-i18next';
export const PageHeader = () => {
const { t, i18n } = useTranslation();
return(
<header>
<div>
<button onClick={() => changeLanguage('de')}>Deutsch</button>
<button onClick={() => changeLanguage('en')}>English</button>
<button onClick={() => changeLanguage('fr')}>Français</button>
<button onClick={() => changeLanguage('ar')}>لعربية</button>
</div>
<h1>{t('EntangledAfrica1')}</h1>
<h2>{t('EntangledAfrica2')}</h2>
</header>
)
};
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment