-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
27 lines (21 loc) · 806 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import "@formatjs/intl-locale/polyfill";
import "@formatjs/intl-pluralrules/polyfill";
import "@formatjs/intl-pluralrules/locale-data/en"; // locale-data for en
import "@formatjs/intl-pluralrules/locale-data/cs"; // locale-data for cs
import React from "react";
import { Text } from "react-native";
import { i18n } from "@lingui/core";
import { I18nProvider, TransRenderProps } from "@lingui/react";
import { messages } from "./src/locales/en/messages.js";
import { Body } from "./src/MainScreen";
i18n.loadAndActivate({ locale: "en", messages });
const DefaultComponent = (props: TransRenderProps) => {
return <Text>{props.children}</Text>;
};
export default function Root() {
return (
<I18nProvider i18n={i18n} defaultComponent={DefaultComponent}>
<Body />
</I18nProvider>
);
}