Internationalization (i18n)

The PWA Bundle provides a way to translate your web manifest in multiple languages. This is useful when you want to provide a localized experience to your users.

To enable this feature, you just have to set the enabled option to true and provide a public URL to the manifest file. The public URL should contain a placeholder for the locale that will be replaced by the current locale.

pwa:
    manifest:
        enabled: true
        public_url: '/pwa/site.{locale}.webmanifest'

Then in your templates, you can use the pwa Twig function to generate the URL to the manifest file. The locale option will be replaced by the current locale.

<!DOCTYPE html>
<html>
    <head>
        {{ pwa(locale=app.request.locale) }}
    </head>
</html>