How to trigger the core WPLANG to make automatically set a language when the theme is activated? [duplicate]

It is not possible to do it exactly as you ask as once you define() a constant in php you can not redefine/override the value. But what you are trying to do is not necessary, this constant is defined as part of the installation of a localized wordress, therefor it is already there, and set correctly, for users that are running localized wordppress.

There is an edge case of people that want different languages for their admin and front end, and need the ability to override the lang settings, but there are plugins/code snippets for them, and you as a theme author should not worry about that.

what you are trying to do will prevent your theme from being used in anything but english and Bangladesh sites. why would you want do limit it in that way.

Leave a Comment