![](/img/trans.png)
[英]Using React Native Elements, how can I globally style the text color of a <ListItem.Title> component?
[英]How to translate title text of component?
如何使用 i18n 工具(例如i18next
)动态翻译标题文本。
目前我正在传递这样的标题:
Settings.options = {
topBar: {
title: {
text: 'Settings',
},
},
};
// get t function somewhere, i.e.
const t = i18next.t:
Settings.options = {
topBar: {
title: {
text: t('settings.title'),
},
},
};
在更改语言时,请确保再次执行此代码部分......所以 t() function 可以再次评估。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.