gentics / mesh-incubator

Project which is home for planned enhancements for Gentics Mesh
3 stars 0 forks source link

Allow assigning languages to projects #41

Open philippguertler opened 5 years ago

philippguertler commented 5 years ago

Gentics Mesh Version, operating system, or hardware.

Problem

Currently, it is always possible to create a node in any language. This makes it difficult for a UI to present suggestions for choosing a language when creating a new node. It is also difficult to provide language fallback parameters when trying to get a node in any language.

Solution

Add a language property to projects. This should be an array of strings which represent the allowed languages in the project. In a project, nodes can only be created in one of the chosen languages.

Additionally, the default language should use the property in the project instead of the language configured in mesh.yml or in environment variables. This old way of setting the default language should be removed. The new default language should use the language fallback mechanism.

Example: When the project languages is set to ["en", "de"], it should behave as if the query parameter for nodes is set to ?lang=en,de.