Internationalization in Cockpit

Hello!

I am building a site using Cockpit that requires two different languages. But there are few things that I don’t like.

  1. Default language is without identifier. Why wouldn’t we set everything by default on the first language (that is in the list/marked as default in config), and postfix every field with this default language, and get rid of the Default language.
  2. If I translate only in my desired languages, but not default, admin table views might be empty.

and get rid of the Default language

It confuses me all the time, too.

If I translate only in my desired languages, but not default, admin table views might be empty.

That would be useful.

I would love a real multilingual backend, too, but there are a lot of places, that need some tweaks.

Some places I remember:

  • labels, description, info for fields and collections
    • I use English field names to keep my code clean and I set German field labels to display them. I do the same with collection names and labels etc.
  • some Javascript libraries
  • date formats need i18n - currently based on moment.js
  • I set i18n: de in config.yaml to be able to query against {"lang":"de"} and to get the default language as result
  • groups could have translatable labels (the current group is displayed on the dashboard in the latest next branch)

Hmmm, damn, seems like this is the point that is not very satisfying for green flag to use this CMS on my current project :frowning:

You could modify it a bit to your needs and create custom views…
date formats use moment.js and can be adjsuted with https://momentjs.com/docs/#/i18n/
The labels are harder, but possible, too.

A start could be to display the user language in the entries table view by default. Add options.lang = App.$data.user.i18n; to: