-
Notifications
You must be signed in to change notification settings - Fork 167
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
Feature: Ability to specify path in configuration file #70
Comments
@KwiqAndre #49 Is this what you need? Or you want to dynamically load translations files on page loading? |
Yes, thats what I need, only with include. |
All good then @KwiqAndre ? |
this is not in your current version, or am I wrong? |
@kwiqadmin it's in current version. See #47 #48 |
artisan lang:js -e auth [Symfony\Component\Console\Exception\RuntimeException] |
Manual exclusion is not implemented. You can define what files should be included in config file. Look for |
I know that. but the config file is not enough. I need something, that I can create lang js files for individual pages. Right now I can have only one configuration. I want to use elixir to create several lang js files, each with another configuration. |
@kwiqadmin Feel free to make a PR for the elixir which will do the job. This isn't implemented. |
PR? I am pretty new to all that stuff (laravel, elexir ...) |
@KwiqAndre PR = Pull Request on GitHub. What sizes of language files do you have that you decided to split them that way? |
@a-komarev the size of the file isn't really relevant here - the fact that you are loading resources that you don't need is what's important. Let's say I have 2000 messages in 20 different languages. That's a lot of string data that I would only need at most 5% of in most cases. A good solution for this is to not compile all the messages into a single javascript file. Instead, you should create a suffix for each locale, eg |
Actually, why not in config have a locale filter? Eg <?php
return [
'locales' => [
'en_us',
'en_uk',
],
]; |
Sometime the language files can get very big. I usually create language files for each page. To avoid that all other language strings (from other pages) get loaded it would be cool, if I could specify via elixir by parameter which language files should be pulled, so that i can create a language js file for each page. The loading overhead can be reduced that way.
The text was updated successfully, but these errors were encountered: