Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1cc3a68
Windows support
a-pechenyi Jan 18, 2018
013fc82
Fix reference for RNI18n project
a-pechenyi Jan 24, 2018
18a9b02
Add missing NuGet references
a-pechenyi Jan 24, 2018
d9e2cc6
Create project using Visual Studio 2015 Update 3
a-pechenyi Jan 26, 2018
c1268a1
Retarget for RN 0.57
colincarter Mar 8, 2019
e9c0163
Retarget min version
colincarter Mar 13, 2019
a270f38
Updating to use PackageReferences for restore rather than project.json
May 8, 2019
82ed291
Fixing the missing package references
May 8, 2019
5b4d53c
Fixing references to react-native to fix CI build.
Jun 27, 2019
99e3fb4
Updating UWP and windows targetted versions
Sep 16, 2019
535a3c8
Upgrade the build.gradle, necessary for RN 0.60
gillpeacegood Feb 4, 2020
91aa53e
Add @axsy-dev scope and publish to GH
Mar 24, 2020
c7b5b1d
adding i18n module port and broken test app
GuyChatfield Apr 17, 2020
22eaf4e
Work in progress, example
gillpeacegood Apr 17, 2020
7fd251a
Get the test working
gillpeacegood Apr 19, 2020
75b7df6
Update proj to reference installed as well as dev location
gillpeacegood Apr 21, 2020
026d264
Makes this work on 0.63
gillpeacegood Oct 16, 2020
7204bd4
Remove old windows dir
colincarter Oct 9, 2023
7737e58
Remove old example project
colincarter Oct 9, 2023
729f0ee
Update dependencies and lock file version
colincarter Oct 9, 2023
ac41797
Uplift project for react-native 0.72
colincarter Oct 10, 2023
5fb3a0d
Add support for test app (which uses yarn)
colincarter Oct 10, 2023
a5e618c
Small cleanup
colincarter Oct 10, 2023
856eb46
example app
colincarter Oct 10, 2023
4d5f9fc
Update example using react-native-webview as a template
colincarter Oct 10, 2023
81f2730
Remove old example app
colincarter Oct 10, 2023
ed2b514
Merge branch 'master' into uplift-project-rn-0.72
colincarter Feb 3, 2025
add4884
Upgrade deps to RN0.73
colincarter Feb 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions example/.babelrc

This file was deleted.

6 changes: 0 additions & 6 deletions example/.buckconfig

This file was deleted.

45 changes: 0 additions & 45 deletions example/.flowconfig

This file was deleted.

1 change: 0 additions & 1 deletion example/.gitattributes

This file was deleted.

60 changes: 11 additions & 49 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,53 +1,15 @@
# OSX
#
*.binlog
*.hprof
*.xcworkspace/
*.zip
.DS_Store

# Xcode
#
.gradle/
.idea/
.vs/
.xcode.env
Pods/
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
dist/
local.properties
*.iml

# node.js
#
msbuild.binlog
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
2 changes: 1 addition & 1 deletion example/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
64 changes: 64 additions & 0 deletions example/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import React, { useState, useEffect } from "react";
import { StyleSheet, Text, ScrollView, View } from "react-native";
import I18n, { getLanguages } from "@axsy-dev/react-native-i18n";

// Enable fallbacks if you want `en-US`
// and `en-GB` to fallback to `en`
I18n.fallbacks = true;

// Available languages
I18n.translations = {
en: require("./translations/en"),
fr: require("./translations/fr"),
"fr-CA": require("./translations/fr-CA"),
es: require("./translations/es"),
};

export default function App() {
const [languages, setLanguages] = useState();

useEffect(() => {
getLanguages().then((languages) => {
setLanguages({ languages });
});
}, []);

return (
<ScrollView style={styles.container} bounces={false}>
<Text style={styles.title}>Additional methods</Text>

<View style={styles.block}>
<Text style={styles.label}>getLanguages (Promise)</Text>
<Text>{JSON.stringify(languages)}</Text>
</View>

<Text style={styles.title}>Demos</Text>

<View style={styles.block}>
<Text style={styles.label}>I18n.t('hello world')</Text>
<Text>{I18n.t("hello world")}</Text>
</View>
</ScrollView>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#F5FCFF",
padding: 24,
paddingTop: 44,
},
title: {
fontSize: 20,
fontWeight: "700",
marginBottom: 8,
},
block: {
marginBottom: 16,
},
label: {
fontWeight: "700",
marginRight: 8,
},
});
65 changes: 0 additions & 65 deletions example/android/app/BUCK

This file was deleted.

Loading