Skip to content

Add support for ajv-i18n to localize validation messages #1131

@m-karnam

Description

@m-karnam

Current behavior:

  • Validation errors produced by yaml-language-server are always in English.
  • For example: Value is above the maximum of 9500.

Problem:

  • Applications embedding monaco-yaml want to show validation errors in the user's preferred language.
  • AJV (which yaml-language-server uses) already supports ajv-i18n, but there’s no way to configure or enable it in yaml-language-server.

Proposed solution:

  • Add a configuration option to specify which ajv-i18n localization should be applied to AJV error messages.
  • Example configuration:
    {
      "yaml.validation.language": "fr"
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions