Help for PHP to choose the format of the config with support of Cyrillic keys

Need to save something in the spirit:

"the price per cubic meter": 19.02,
"price-per-kilogram": 3.90,
"maximum-weight": 100000,
"maximum dimensions": {
"height": 2.5,
"width": 5,
"length": 10,

etc. I'm not sure what json_encode is normally treated with Cyrillic keys. What could be a quick solution? And Yes, the use of the Cyrillic alphabet in the task at hand would be best, otherwise accountants would be confused in their baths if they write in Latin.
October 3rd 19 at 03:42
3 answers
October 3rd 19 at 03:44
Json_decode will decode, and the Cyrillic alphabet she is not afraid.
And to just add json_encode JSON_UNESCAPED_UNICODE — all
October 3rd 19 at 03:46
How about yaml?
October 3rd 19 at 03:48
If you are using PHP, then it is assumed that data is stored on the server not on the client. The server may store the data (in this case "keys") in a convenient format, and display before user to convert.

So my advice — use handy you the keys, and accountants to show the translated keys.
Himself "config" of course stored in the database, because what you gave is not very similar to the application configuration.
Plus. To give users the right to write the keys in the config it's a shit idea. - fleta.McLaughl commented on October 3rd 19 at 03:51

Find more questions by tags PHP