Answers.Body: <p>You're going to have to remove them directly from the database's <code>craft_locales</code> table.</p>
  
  <p>You're using "locales" in a way we originally didn't design them for, which is why they're getting truncated at 12 characters.</p>
  
  <p>If you're going to do this, you'll need to keep them at 12 characters or less for them to work.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-19T22:23:49.927Z
Answers.Text: Appreciate you replying to a non-standard issue and for the fast response. 12 characters and db delete it is, thanks!
Answers.UserDisplayName: user2190
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-19T21:46:29.670Z
Answers.LastActivityDate: 2015-03-19T21:46:29.670Z
Answers.UserDisplayName: Brad Bell
Body: <p>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:</p>
  
  <pre><code>veerlofts' =&gt; 'Veer Lofts',
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>'ab' =&gt; 'Abkhazian',
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'name' of undefined
  </code></pre>
  
  <p>These older (whether standard out of the box or custom) locales are still defined in /craft/framework/i18n/data. </p>
  
  <p>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:</p>
  
  <p><img src="https://i.sstatic.net/es0TT.png" alt=""></p>
  
Tags: <localization><admin>
Title: Any way to force delete a locale?
ThreadText: # Any way to force delete a locale?
  
  (Asked by: username_0 on 2015-03-19)
  
  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:
  
  ![](https://i.sstatic.net/es0TT.png)
  
  **Tags:** localization, admin
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-03-19. Score: 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.
  
  > **Comments:**
  > **username_0**: Appreciate you replying to a non-standard issue and for the fast response. 12 characters and db delete it is, thanks!  
  
  ---
  
  