Skip to content

Instantly share code, notes, and snippets.

@ahmedsayedabdelsalam
Last active August 8, 2023 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmedsayedabdelsalam/c51f0a03a35d827bd474da554b860358 to your computer and use it in GitHub Desktop.
Save ahmedsayedabdelsalam/c51f0a03a35d827bd474da554b860358 to your computer and use it in GitHub Desktop.
laravel localazy
{
"upload": {
"files": [
{
"type": "php",
"pattern": "lang/en/**.php"
},
{
"group": "existing",
"type": "php",
"pattern": "lang/*/**.php",
"excludes": [
"lang/en/**.php"
],
"lang": "${autodetectLang}"
},
{
"type": "json",
"pattern": "lang/*.json",
"lang": "${autodetectLang}",
"features": ["source_is_key"]
}
]
},
"download": {
"files": [
{
"conditions": "equals: ${fileExt}, php",
"output": "lang/${lang}/${file}"
},
{
"conditions": "equals: ${fileExt}, json",
"output": "lang/${lang}.json"
}
]
}
}
{
"writeKey": "<localazy-write-key>",
"readKey": "<localazy-read-key>"
}
@ahmedsayedabdelsalam
Copy link
Author

keys in localazy.keys.json file

@ahmedsayedabdelsalam
Copy link
Author

@ahmedsayedabdelsalam
Copy link
Author

you may need to upload --force first time if you get an error that no source file for the json files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment