Open nazar-pc opened 8 years ago
I have translation files. They are .*/languages/[^/]+\.json (it was path regexp) files located in multiple places across projects. In simplest use case keys from those files are used as properties of object (using __get() method):
.*/languages/[^/]+\.json
__get()
\cs\Language::instance()-><caret>
I imagine this something like:
{ "name" : "translations", "source" : { "contributor" : "json_file", "path_mask" : ".*/languages/[^/]+\\.json", "lookup" : "key", "text" : "value" } }
Where lookup might be key or value (is used as lookup_string). And OPTIONAL text is used as type_text.
lookup
key
value
lookup_string
text
type_text
When and if this trivial use case I can provide few advanced use cases (nested JSON structures and object's properties with common prefix removed).
I have translation files. They are
.*/languages/[^/]+\.json
(it was path regexp) files located in multiple places across projects. In simplest use case keys from those files are used as properties of object (using__get()
method):I imagine this something like:
Where
lookup
might bekey
orvalue
(is used aslookup_string
). And OPTIONALtext
is used astype_text
.When and if this trivial use case I can provide few advanced use cases (nested JSON structures and object's properties with common prefix removed).