Mix language setting

Closes #2656 and #2657.
What to do with Application.format_error? If it wasn't for it, then it is easy to have all common functions except for the main one.