Kalia Martin Reina
Kalia Martin Reina

Reputation: 100

Translating static content with i18n

I am using the apostrophe-i18n module, to translate the static texts of my page and I am also using the apostrophe-workflow to have several locales. But it seem that i18n doesn't applies to the page, if a don't add to the url (with js) the parameter lang=en. Is there some other way to do this in the configuration of the modules? The js code that I did refresh to many times the page.

Thanks in advance!

Upvotes: 1

Views: 181

Answers (1)

Kalia Martin Reina
Kalia Martin Reina

Reputation: 100

I've found how to make i18n work with apostrophe-workflow. In the app.js, you have to add to the module apostrophe-workflow the prefixes like this:

'apostrophe-workflow': {
  prefixes: {
    'en': '/en',
    'de': '/de'
  },
  locales: [
    {
      name: 'default',
      label: 'Default',
      private: true,
      children: [
        {
          name: 'en',
          label: 'English',
        },
        {
          name: 'de',
          label: 'German',
        }
      ]
    },
  ],
  defaultLocale: 'de',
  alias: 'workflow',
  replicateAcrossLocales: false,
},

This way, the i18n module works fine.

Upvotes: 1

Related Questions