Skip to content

Default message error > change language #4249

@matthieuowlie

Description

@matthieuowlie

Describe the bug
I wanted my API to send default error messages in french on auth login when the user, associated with identifier and password sent, is not found or blocked.

After having strapi configured (https://strapi.io/documentation/3.0.0-alpha.x/configurations/configurations.html#language) is doesn't worked.

Steps to reproduce the behavior

  1. Go to ./config/language.json.
  2. Change the language.json defaultLocale with 'fr'
  3. Call the API with a POST request on URL "localhost:1337/auth/local" with identifier and password in body.
  4. Get the error message in english

Expected behavior
The error message should be in the locale language parameter in ./config/language.json

Screenshots
image

image

System

  • Node.js version: v10.16.3
  • NPM version: 6.9.0
  • Strapi version: 3.0.0-beta.16.5
  • Database: sqlite3 in .tmp/data.db
  • Operating system: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions