- Make a custom plugin file
// withTranslation.js
const { AndroidConfig, withStringsXml } = require('@expo/config-plugins')
const withTranslation = (expoConfig) => {
return withStringsXml(expoConfig, (modConfig) => {
modConfig.modResults = AndroidConfig.Strings.setStringItem(
[
// find keys from https://github.com/imgly/pesdk-android-demo/tree/master/default_res_files/v_10_0/res/values
{ $: { name: 'pesdk_editor_title_name', }, _: '編集', },
{ $: { name: 'pesdk_editor_text_exportProgressUnknown', }, _: '書き出し中', },
],
modConfig.modResults
)
return modConfig
})
}
module.exports = withTranslation
- add config to plugins
// app.config.js
module.exports = ()=> ({
name: 'yourapp',
//...
plugins: [
"react-native-imglysdk",
"./withTranslation.js",
],
})
Done!