Remove language

Hey there,

I have had two languages on a site. de and en. I had to remove to English one and did it by removing the contentDimension in the yaml file. Now the urls still have the /de inside.

How can I remove the dimension completly?

The yaml:

Neos:
  ContentRepository:
    contentDimensions:
      language:
        label: Sprache
        icon: icon-language
        default: de
        defaultPreset: de
        presets:
          de:
            label: Deutsch
            values:
              - de
            uriSegment: de

Thanks and have a great sunny day,
Matthias

./flow node:repair should do it

https://neos.readthedocs.io/en/stable/References/CommandReference.html#package-neos-contentrepository

Remove nodes with invalid dimensions removeNodesWithInvalidDimensions

Will check for and optionally remove nodes which have dimension values not matching the current content dimension configuration.

Hey @sorenmalling,

Thanks for the hint. Noderepair alone doesn’t do the job. Now I tried to remove all content dimensions from the yaml. Now it’s like a new neos project without any content dimenions. Noderepair now will remove everything, because /de doesn’t exist anymore.
Isn’t there a way to migrate from /de to nothing?

Matthias

Hello @Matschess,

you should keep the German language dimension, so all your German content still stays the way it is. To adopt the url you can reconfigure Settings.yaml to do this:

Neos:
  ContentRepository:
    contentDimensions:
      language:
        label: Sprache
        icon: icon-language
        # The default dimension that is applied when creating nodes without specifying a dimension
        default: de
        # The default preset to use if no URI segment was given when resolving languages in the router
        defaultPreset: de
        presets:
          de:
            label: Deutsch
            values:
              - de
            uriSegment: ''

Setting the default language uriSegment to ‘’ will remove the language from the uris.

1 Like