Open WatheqAlshowaiter opened 1 month ago
I definitely think just adding the en.php is wrong. I didn't realize it did that. I will look into it.
I shorty looked into making the package work with other file structures the main problem with it was the freedom to basically do anything, meaning I had to figure out the file structure / php structure.
__ ('some.deep.nested.text')
/ en
/some.php
[
'deep' => [
'nested' => [
'text' => 'translation'
]
]
]
/ en
/some/deep/nested.php
[
'text' => 'translation'
]
Take the example above, both are valid, and there was a lot to keep track of so I stopped it, in search of a better solution.
I didn't know about @MohmmedAshraf laravel-translations. and definitely agree a good goal is that it's compatible.
when no
en.json
file provided, the package will createen.php
file translation which is not working.the php language files not working until they are inside language folders.
the fix simply to create language json file if not exists.
Secondly, I hope the package be able to add php files from config like
msg.php
which we can use php files for translation using this package, because we can use language ui likehttps://github.com/MohmmedAshraf/laravel-translations
package, and the flexibility of nesting keys, etc