0

Does anyone know if it's possible or how to change the "More" label to another word in TabView (SwiftUI)?

When there are more than 5 elements or views, the "More" label with three points (ellipsis) is added. I would like to be able to change that word that comes by default and put another word.

enter image description here

    var body: some View {
    TabView(selection: handler) {
        InicioView()
            .tabItem {
                Label("Inicio", systemImage: "house.circle")
                    .font(.system(size: 32))
                    .foregroundColor(Color("verde"))
            }.tag(0)

        TarjetaRodelagView()
            .tabItem {
                Label("Tarjeta Rodelag", systemImage: "creditcard.circle")
                    .font(.system(size: 32))
                    .foregroundColor(Color("verde"))
            }.tag(2)

        CategoriasView()
            .tabItem {
                Label("Categorías", systemImage: "list.bullet.rectangle.fill")
                    .font(.system(size: 32))
                    .foregroundColor(Color("verde"))
            }.tag(1)

        InicioView()
            .tabItem {
                VStack {
                    Image("ari").resizable().frame(width: 55, height: 55).scaledToFit()
                    Text("ARI")
                }
            }.tag(4)

        SucursalesView()
            .tabItem {
                Label("Sucursales", systemImage: "map")
                    .font(.system(size: 32))
                    .foregroundColor(Color("verde"))
            }.tag(3)

        CatalogoView()
            .tabItem {
                Label("Catálogo", systemImage: "book.circle")
                    .font(.system(size: 32))
                    .foregroundColor(Color("verde"))
            }.tag(6)
    }.accentColor(Color("verde"))
  • You may be getting close votes because you didn't include the code that represents this situation. I'd suggest adding a simple [mre] with a `TabView` with too many items to fit in the tab bar so that people can reproduce the scenario. – jnpdx Jun 26 '22 at 21:06
  • that's against apple guidelines – belal medhat Jun 26 '22 at 21:09
  • the `more` item is provided automatically by SwiftUI if there are too many tab bar items to be displayed. You can't change it. But you can control the number of items displayed based on the device and orientation and then add your own last tab item to show further options. – ChrisR Jun 26 '22 at 21:50
  • Beyond going against apple guidelines, it is a language issue, the app is aimed at an audience in Spanish and the entire app is in Spanish, designed only for the Spanish-speaking audience. What I am looking for is to change that "more" label and put it in Spanish. – greermurray Jun 26 '22 at 21:52
  • The TabView has many more items or views... more than 5. What I'm looking for is to change the "more" tag to another word in Spanish, for example: "Options" (in Spanish). or any other word. – greermurray Jun 26 '22 at 21:55
  • ok, look up `localisation` or change the development language of your app. If the app then runs on a Spanish system it should change to a Spanish word automatically. – ChrisR Jun 27 '22 at 06:20
  • @ChrisR Thanks for your help. Thanks for your help, I investigated based on your comment and I was able to find the solution in this link: https://fluffy.es/introduction-to-localization/ – greermurray Jun 27 '22 at 18:00

0 Answers0