Commit 0dcc1f614b2ab4f0d4bbac5fd29676595072a133 introduced a regression
that caused translations to no longer work (the UI would always remain
in English).
The reason for this is that the translator objects installed into the
application have to remain alive in order to function. By moving them
into a dedicated function they went out of scope very quickly after
their creation and thus none of them actually performed any work.
This commit fixes this by creating the translator objects on the heap
and using a smart-pointer-like structure for making sure they are only
deleted once they are really not needed anymore.
Fixes #4856