I'm trying to programmatically enable/install another language? (Through install profile).. Any suggestions, please?


Assuming your environment is Drupal (or may be OK, too?), you can use locale_add_language() function (defined in locale in the core). For example, if you want to enable French, run locale_add_language("fr") and the job's done.

Then, you can check the result via language_list() to make sure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.