The module is forked from
react-native-fbt
. Released to@dooboo/react-native-fbt
. This repo fixes the build problem caused by thecodegen
temporarily.
React Native module to enable the use of the FBT translation framework in React Native apps (iOS/Android).
$ yarn add @dooboo/react-native-fbt --dev
- In Xcode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-fbt
and addFbt.xcodeproj
- In Xcode, in the project navigator, select your project. Add
libFbt.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.facebook.react.modules.FbtPackage;
to the imports at the top of the file - Add
new FbtPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-fbt' project(':react-native-fbt').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fbt/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-fbt')
- The only currently supported way for changing the app language is by changing the language on the device itself. This native library depends on how the Android OS selects files depending on the language of the device.