-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the flexible language path in TranslationConfiguration
#19
Conversation
- Added the `absoluteLanguageDirectory` param in `TranslationConfiguration` type. - Refactored code in `determineLaravelVersion` function. - Refactored code in `Loader` file to separate and improve the logic. - Created a file for `mergeDeep` function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good I will I just need another to check. will follow up
@lionslair Hi, sorry for the question, did we get any update about the future of this PR? 😅 |
Yeah still waiting for college to look it over too |
@immersedone @lionslair Conflicts resolved. |
I don't think this works, typescript forced me to add .js at the end of the import. But you haven't added it here |
Description
This PR added the absoluteLanguageDirectory parameter in the TranslationConfiguration type to define a custom language directory if needed.
By default, if the Laravel version is lower than v9, the directory is
resources/lang
. Otherwise, the directory will belang/
in the root project. This validation causes a problem if the project version is higher than v9 and it saves the localization files in theresources/lang
directory. A simple solution is to create a symbolic link from theresources/lang
directory to thelang/
directory in the root project. However, ideally, people should configure a custom directory if needed from the Vite configuration to avoid creating unnecessary processes to solve problems with the language directory.absoluteLanguageDirectory
param inTranslationConfiguration
type.determineLaravelVersion
function.Loader
file to separate and improve the logic.mergeDeep
function.Testplan