How can I force Grails to use only one language?

前端 未结 4 1222
梦如初夏
梦如初夏 2021-02-05 12:29

I want to make my Grails application support only one language, that I can define somewhere, completely ignoring the client\'s headers or the \"lang\" parameter. Is there any wa

4条回答
  •  粉色の甜心
    2021-02-05 13:35

    remove all messages_xx.properties files and keep only the messages.properties files. This is the default message bundle to which the system will always fall back if it can't find the right message bundle.

    This way you can still use messages (and thus keep the option to nationalize your app) but users will get always the same language.

提交回复
热议问题