[loc] use a direct table for the messages

* More efficient and also the first step for addressing #188