Is it possible to change the text of the "Add to home screen" prompt of a PWA?

Asked

Viewed 32 times

2

Is there any way to exchange the text "Add to home screen" of a PWA? I figured it was by manifest PWA, however I found no specification, I have seen in some sites this text in Portuguese, there is some solution?

My PWA:

inserir a descrição da imagem aqui

Example of how I wanted:

inserir a descrição da imagem aqui

Follow the configuration of my PWA:

name: 'Meu App',
lang: 'pt-br',
scope: '/',
short_name: 'MeuApp',
description: 'Meu App PWA',
background_color: '#fff',
theme_color: '#fff',
display: 'standalone',
start_url: '/',
orientation: 'portrait',
icons: [
  {
    src: '/icons/icon-72x72.png',
    sizes: '72x72',
    type: 'image/png'
  },
  {
    src: '/icons/icon-96x96.png',
    sizes: '96x96',
    type: 'image/png'
  },
  {
    src: '/icons/icon-128x128.png',
    sizes: '128x128',
    type: 'image/png'
  },
  {
    src: '/icons/icon-144x144.png',
    sizes: '144x144',
    type: 'image/png'
  },
  {
    src: '/icons/icon-152x152.png',
    sizes: '152x152',
    type: 'image/png'
  },
  {
    src: '/icons/icon-192x192.png',
    sizes: '192x192',
    type: 'image/png'
  },
  {
    src: '/icons/icon-384x384.png',
    sizes: '384x384',
    type: 'image/png'
  },
  {
    src: '/icons/icon-512x512.png',
    sizes: '512x512',
    type: 'image/png'
  }
]
  • Does this refer to your Android or iOS browser or is this referring to another location? If it is the "button" of the browser menu, it is characteristic of the browser and not of the page you created with PWA capability.

  • @Guilhermenascimento in my current example I’m referring to the prompt on Android same

  • 1

    The prompt and button are part of the browser and not part of your app, so there is no way, but it would really be more interesting if the site with PWA capability was like an automatic browser Toolbar (that had the pwa icon) with a button instead of having q go in the menu and then confirm at a prompt. PS: at least in iOS is bad, in android is more practical, not tested, is a Toolbar already, the text is in English pq possibly your system is in English

  • PS: Uol seems to be simulated, I have not tested it yet (I took an android to test)

  • I imagine that the da UOL is not the default browser prompt, if you want to add the answer that there is no way, the message follows the same browser language, I think it is valid for those who have the same question

  • Just to reaffirm, this that you saw on the UOL site is generated by the browser, however my android system is in English and the message appears in English as well, the probability is that you have opened the UOL on your personal phone and the PWA in an emulator, but the message "Add <name> To Homescreen" is a native Toolbar and if your operating system is in English then it will display the text in English. Follow the print to confirm, in emulate with OS: https://i.stack.Imgur.com/TH2QK.png

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.