Forum

Internationalization

I have tried the internationalization by adjusting the default translation file. It works fine and I get the translations.

However, is there a way to add multiple translations? So that depending on the user’s preference, explorer shows different languages. If yes, how would one do it? Simply create new folder under apps/block_scout_web/priv/gettext/ folder and put new translations to LC_MESSAGES folder?

Also are there any ways to internationalize the date/time? Currently dates are shown in English, I would like to change them as well.

However, is there a way to add multiple translations? So that depending on the user’s preference, explorer shows different languages. If yes, how would one do it? Simply create new folder under apps/block_scout_web/priv/gettext/ folder and put new translations to LC_MESSAGES folder?

We have never done that, but it should work as you described, from my perspective.

Also are there any ways to internationalize the date/time? Currently dates are shown in English, I would like to change them as well.

There is no such built-in functionality.

Even though the mix phx.server command shows additional languages as localization and even chooses the one I set as default, it still display pages on en. I can see the logs on the console that serves content in en to each new websocket.