add langs flags repo.

This commit is contained in:
Jordan Hewitt
2025-01-23 07:00:50 -08:00
parent e83034cedc
commit 7d2fb3d589
6 changed files with 32 additions and 4507 deletions

View File

@ -1,5 +1,8 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import { CachedTranslator } from "@/app/i18n/api"
import { language_t } from "@/app/i18n/lang"
import { longLang } from "@/app/i18n/lang"
import { useEffect, useRef, useState } from "react"
import { Button } from "react-native"
type ISpeakButtonProps = {
country: string,
@ -7,7 +10,7 @@ type ISpeakButtonProps = {
}
function iSpeak(language : string) {
return `I speak ${language}.`
return `I speak ${longLang(language)}.`
}
async function iSpeakTr(targetLang : string, sourceLang = "en") {
@ -17,5 +20,18 @@ async function iSpeakTr(targetLang : string, sourceLang = "en") {
}
const ISpeakButton = (props : ISpeakButtonProps) => {
}
const [title, setTitle] = useState("");
useEffect(() => {
async function () {
setTitle(await iSpeakTr(props.language) as string);
}
}, []);
<Button onPress={setLanguage} title={}>
</Button>
}
export default ISpeakButton;