If in LR menu I'll choose "Setting->Process->2010" then everything works well.
Probably. it needs to count the currently used settings version 2010 or 2012. Somebody has a sample how to correct process setting versions in different versions of Lightrooms?
Process version 2012 introduced a number of new develop settings, e.g. Contrast2012, Exposure2012, etc. See the API documentation for photo:getDevelopSettings(). The documentation doesn't seem to be maintained, so the most authoritative way to find out the names of develop settings is by printing the result of photo:getDevelopSettings().
Now it is moreless clear what in LR3 i.e. the "Contrast" parameter has keyname "Contrast" and in LR4 it has keyname "Contrast2012". But what about i.e. localized versions of LR? If a LR is localized for a national characters then maybe the keyname also may be different, some like "Контрастность2012"? Where is a standard pattern how to correct process keynames independly on LR version?
I met a sample on one forum but I'm not sure what it is a correct approach
local settingsKeys = require('DevelopSettingKeys')
If a LR is localized for a national characters then maybe the keyname also may be different, some like "Контрастность2012"?
No, all of the names in the SDK are as written in the documentation, in English (for better or worse). They don't get localized to the installed language.
Unfortunatelly "Lightroom SDK Guide.pdf" doesnt contain a list of settings keynames. The API Reference for LR5SDK contains i.e "Contrast" keyname. About "Contrast2012" it is possible to read only from forums.
If there is not a standard pattern how to work with different versions of LR then probably the simplest way is just check some global environment variable with LR version number and use keynames accordingly this value.
The LR 5 SDK API Reference does mention the process version 2012 settings:
However, as mentioned above, the documentation isn't well-maintained, so you're always better off double-checking it by dumping out the results of getDevelopSettings(). E.g. in LR, take a sample photo, set all the develop settings to non-default values, and then in a script invoke Debug.lognpp(photo:getDevelopSettings()) (using the Debug module from my debugging toolkit for Lightroom).
probably the simplest way is just check some global environment variable with LR version number and use keynames accordingly this value.
Agreed. You can get the version via LrApplication.versionTable().
Check "ProcessVersion" in the photo development settings, Process Version 2012 is "6.7" (there also was a "6.6" for LR4 beta).
It is a valuable advice