Open pitampoudel opened 2 months ago
I have defined a Tab as:
data object CampaignsTab : Tab { override val options: TabOptions @Composable get() { val title = SharedRes.strings.label_campaigns.desc().localized() val icon = rememberVectorPainter(Icons.Default.Campaign) return remember { TabOptions( index = 0u, title = title, icon = icon ) } } }
And I am consuming that as:
NavigationBar { remember { listOf(CampaignsTab, LeaderboardTab) }.forEach { tab -> val tabNavigator = LocalTabNavigator.current NavigationBarItem( selected = tabNavigator.current == tab, onClick = { tabNavigator.current = tab }, icon = { tab.options.icon?.let { icon -> Icon( painter = icon, contentDescription = tab.options.title ) } }, label = { Text(tab.options.title) } ) } }
I expect my bottom navigation bar texts to change automatically whenever the app language changes like all other components.
I have defined a Tab as:
And I am consuming that as:
I expect my bottom navigation bar texts to change automatically whenever the app language changes like all other components.