Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Fix locale association #121

Closed
wants to merge 2 commits into from
Closed

Fix locale association #121

wants to merge 2 commits into from

Conversation

jimping
Copy link

@jimping jimping commented Mar 23, 2020

When using multiple locales with e.g. a_locale.json files and folders with php files a_locale/errors.php then the translations were mixed in the wrong files because of a wrong "lastLocale" variable. The locale will now be determined by the given file path. That results to the correct association.

In my example translations from de and en had been merged to fr.js. With this patch it correct.

E.g. with:

resources/lang/{de|fr|en|pl|es}.json AND
resources/lang/{de|fr|en|pl|es}/errors.php
resources/lang/{de|fr|en|pl|es}/fields.php etc.

and Command:

php artisan vue-i18n:generate --multi-locales

Jonas Imping added 2 commits March 23, 2020 11:08
When using multiple locales with e.g. a_locale.json files *and* folders with php files a_locale/errors.php then the translations were mixed in the wrong files because of a wrong "lastLocale". The locale will now be determined by the given file path. That results to the correct association.
@jimping jimping closed this by deleting the head repository May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant