Implement multilingual support by integrating i18n for dynamic text rendering across the app. Added language selection modal in HomeScreen and updated various components to utilize localized strings. Updated package dependencies for async storage and localization.
This commit is contained in:
@@ -3,6 +3,7 @@ import { View, Text, StyleSheet, ImageBackground, Pressable } from 'react-native
|
||||
import Colors from '@/constants/Colors';
|
||||
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||
import prayerTimeCalculator, { cities } from '@/utils/prayerTimeCalculator';
|
||||
import i18n from '@/i18n';
|
||||
|
||||
type Prayer = {
|
||||
name: string;
|
||||
@@ -97,7 +98,7 @@ export default function PrayerTimeCard() {
|
||||
</View>
|
||||
</View>
|
||||
<Text style={styles.remainingTimeLabel}>
|
||||
{nextPrayer ? `Left on ${nextPrayer.name} prayer` : 'Prayer Times'}
|
||||
{nextPrayer ? i18n.t('leftOnPrayer', { prayerName: nextPrayer.name }) : i18n.t('prayerTimes')}
|
||||
</Text>
|
||||
<Text style={styles.remainingTime}>{remainingTime}</Text>
|
||||
<View style={styles.prayerTimesContainer}>
|
||||
|
||||
Reference in New Issue
Block a user