2

I've been able to customize the locale feature for use in a multi-site project, by creating custom locals in /craft/framework/i18n/data. So now each locale has the site name, instead of a language code like "en_au". For example:

veerlofts' => 'Veer Lofts',

instead of:

'ab' => 'Abkhazian',

The problem is, now I can't delete any of the locales (custom or otherwise) in /admin/settings/locales. It gives me this console error in locales.js:

Uncaught TypeError: Cannot read property 'name' of undefined

These older (whether standard out of the box or custom) locales are still defined in /craft/framework/i18n/data.

Another strange thing, if it helps troubleshoot, is that during the first round of trying to customize the locales, the longer custom names were getting truncated to 12 characters, all lowercase. Those are the ones I'm trying to delete, so the CMS users won't get confused.See attached screen:

2

You're going to have to remove them directly from the database's craft_locales table.

You're using "locales" in a way we originally didn't design them for, which is why they're getting truncated at 12 characters.

If you're going to do this, you'll need to keep them at 12 characters or less for them to work.

1
  • Appreciate you replying to a non-standard issue and for the fast response. 12 characters and db delete it is, thanks!
    – user2190
    Mar 19 '15 at 22:23

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.