Skip to content

getValidLangKey erroneously assumes some paths to be specific languages #130

@alexej-d

Description

@alexej-d

Take for example a configuration, were the languages en and de are defined and for pages with the en language there should be no lang code in the url:
{ resolve: 'gatsby-plugin-i18n', options: { prefixDefault: false, langKeyDefault: 'en', useLangKeyLayout: false, } }

In this case getValidLangKey wouldn't correctly work with urls like /destinations because those are assumed to be languages (the language de in this case). Setting prefixDefault to true would fix this, but makes it impossible to use a default language without the lang code url path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions