E
E
Egor Zhivagin2017-09-13 15:51:48
JavaScript
Egor Zhivagin, 2017-09-13 15:51:48

How correct is it to write the names of properties in an object in Russian?

How correct is it to write properties in Russian in Mongu? for example

{
    'количество': 1,
    'имя': 'Имя'
}

I am importing data from SQL. From there, all the data comes in Russian (SQL database is not in my power).
Now I'm writing like this:
{
    'kolichestvo': {
        'name': 'количество',
        'value': '1'
    }
}

But for each new property, you have to come up with a name in English. manually. There are hundreds of property names. Not comme il faut. There is a great temptation to write in Russian or come up with a universal solution.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Kornilov, 2017-09-13
@Krasnodar_etc

In quotation marks - it is quite correct. Will work.

var o= {
    'количество': 1,
    'имя': 'Имя'
}
console.log('o["количество"]= ', o["количество"]);

E
Evgeniy Kvasyuk, 2017-09-13
@EvgeniyKvasyuk

For Russian in the code, the developer must be very painful. Do not do it this way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question