Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6208

React-Native header is not getting translated

$
0
0

So I managed to get translation working pretty good in my TypeScript React-Native application. Everything is getting translated (every page and the bottom navigation), except for the header titles.

The code that I am using to achieve this goal looks like below:

const NewsPageStack = createStackNavigator({
    News: {
        screen: News,
        navigationOptions: ({navigation, navigationOptions}) => ({
            title: translationStrings.news.toUpperCase(),
            headerTintColor: COLORS.primaryLightBlue,
            headerTitleStyle: Styles.headerTitleStyle,
        }),
    }
});

The translations are done with react-localization. I am pretty sure that it has something to do with the StackNavigator, but I have no clue how to solve this.


Viewing all articles
Browse latest Browse all 6208

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>