Skip to content

[Question] Why default language not work? #2118

Description

Hi, I have this strange problem:
in the locales path i have three language file:

  • all.de.yaml
  • all.en.yaml
  • all.es.yaml

In the app.go I have:

func translations() buffalo.MiddlewareFunc {
	var err error
	if T, err = i18n.New(packr.New("app:locales", "../locales"), "es"); err != nil {
		app.Stop(err)
	}
	return T.Middleware()
}

But always the app start with the "de" language. I tryied to change "es" with "en" but it return always "de". Seams that it set the default language getting the first file in alpabetic order.

What I missing?

Activity

  1. locked and limited conversation to collaborators on Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions