remove a locale from the store
329247
function REMOVE_LOCALE(state, payload) {
      // check if the given locale is present in the state
      if (state.translations.hasOwnProperty(payload.locale)) {
        // check if the current locale is the given locale to remvoe
        if (state.locale === payload.locale) {
          // reset the current locale
          state.locale = null;
        } // create a copy of the translations object


        var translationCopy = Object.assign({}, state.translations); // remove the given locale

        delete translationCopy[payload.locale]; // set the state to the new object

        state.translations = translationCopy;
      }
    }
188052
void confirmDeleteLocale() {

        CmsConfirmDialog dialog = new CmsConfirmDialog(
            Messages.get().key(Messages.GUI_CONFIRM_DELETE_LOCALE_TITLE_0),
            Messages.get().key(Messages.GUI_CONFIRM_DELETE_LOCALE_TEXT_0));
        dialog.setHandler(new I_CmsConfirmDialogHandler() {

            public void onClose() {

                // nothing to do
            }

            public void onOk() {

                deleteCurrentLocale();
            }
        });
        dialog.center();
    }
566323
function removeTranslation( $languageCode )
    {

        $versionNum = $this->attribute( 'version' );

        $contentObjectAttributes = $this->contentObjectAttributes( $languageCode );

        $db = eZDB::instance();
        $db->begin();
        foreach ( $contentObjectAttributes as $attribute )
        {
            $attribute->removeThis( $attribute->attribute( 'id' ), $versionNum );
        }
        $db->commit();

        $this->updateLanguageMask();
    }
1225391
function replaceLocale(context, payload) {
      context.commit({
        type: 'REPLACE_LOCALE',
        locale: payload.locale,
        translations: payload.translations
      });
    }
769820
function addLocale(locale, translations) {
    return store.dispatch({
      type: "".concat(moduleName, "/addLocale"),
      locale: locale,
      translations: translations
    });
  }
928603
def enforce_available_locales!(locale)
      if locale != false && config.enforce_available_locales
        raise I18n::InvalidLocale.new(locale) if !locale_available?(locale)
      end
    end
689027
public void removeLocalTx(Xid xid) {
      EmbeddedTransaction tx = localTxTable.remove(xid);
      if (trace) {
         log.tracef("[%s] Removed tx=%s", xid, tx);
      }
   }
805641
def desk_locale(self, locale):
        """"""

        locale = locale.lower().replace('-', '_')
        return self.vendor_locale_map.get(locale, locale)
1047608
@DELETE
    @RequiresPermissions(I18nPermissions.LOCALE_DELETE)
    public Response deleteAllAvailableLocales() {
        List<Locale> locales = localeRepository.loadAll();
        for (Locale locale : locales) {
            localeRepository.remove(locale);
        }
        return Response.noContent().build();

    }
750394
def _process_locale(self, locale):
        """"""

        if locale.lower().startswith('en'):
            return False

        return (locale in self.enabled_locales or

                self.reverse_locale_map.get(locale.lower(), None)
                in self.enabled_locales or

                locale in self.lower_locales or

                self.reverse_locale_map.get(locale.lower(), None)
                in self.lower_locales
        )
933594
private boolean replaceValues(Locale locale) {

        try {
            SortedProperties localization = getLocalization(locale);
            if (hasDescriptor()) {
                for (Object itemId : m_container.getItemIds()) {
                    Item item = m_container.getItem(itemId);
                    String key = item.getItemProperty(TableProperty.KEY).getValue().toString();
                    Object value = localization.get(key);
                    item.getItemProperty(TableProperty.TRANSLATION).setValue(null == value ? "" : value);
                }
            } else {
                m_container.removeAllItems();
                Set<Object> keyset = m_keyset.getKeySet();
                for (Object key : keyset) {
                    Object itemId = m_container.addItem();
                    Item item = m_container.getItem(itemId);
                    item.getItemProperty(TableProperty.KEY).setValue(key);
                    Object value = localization.get(key);
                    item.getItemProperty(TableProperty.TRANSLATION).setValue(null == value ? "" : value);
                }
                if (m_container.getItemIds().isEmpty()) {
                    m_container.addItem();
                }
            }
            return true;
        } catch (IOException | CmsException e) {
            // The problem should typically be a problem with locking or reading the file containing the translation.
            // This should be reported in the editor, if false is returned here.
            return false;
        }
    }
1171122
function matchLocale(locale) {
    var found = false;
    if (!locale) return false;
    locale = locale.replace(/_/g, '-').toLowerCase();
    if (localesLookup[locale]) return localesLookup[locale];
    if (options.matchSubTags) {
      while (~locale.indexOf('-')) {
        var index = locale.lastIndexOf('-');
        locale = locale.substring(0, index);
        if (localesLookup[locale]) {
          found = localesLookup[locale];
          break;
        }
      }
    }
    return found;
  }
730159
public void removeGlobals ()
    {
        Iterator<String> i = _imports.iterator();
        while (i.hasNext()) {
            String name = i.next();
            if (name.indexOf('.') == -1) {
                i.remove();
            } else if (name.startsWith("java.lang")) {
                i.remove();
            }
        }
    }
1208480
def remove(self):
        
        self.__bulk.add_delete(self.__selector, _DELETE_ALL,
                               collation=self.__collation)
440086
function removeTranslation( $languageLocale )
    {
        $this->NameList->removeName( $languageLocale );
        $this->DescriptionList->removeName( $languageLocale );
        $this->DataTextI18nList->removeName( $languageLocale );
    }
188098
public function removeProductsFromLocale($products, $locale)
	{
		$timeStamp = time();
		$mlsModel = $this->kernel->getContainer()->get('multilanguagesupport.model');
		$response = $mlsModel->getLanguage($locale);
		if ($response->error->exist) {
			return $response;
		}
		$locale = $response->result->set;
		$toRemove = array();
		$count = 0;
		foreach ($products as $product) {
			$response = $this->getProduct($product);
			if ($response->error->exist) {
				continue;
			}
			$toRemove[] = $response->result->set->getId();
			$count++;
		}
		if ($count > 0) {
			$ids = implode(',', $toRemove);
			$table = $this->entity['apl']['name'] . ' ' . $this->entity['apl']['alias'];
			$qStr = 'DELETE FROM ' . $table
				. ' WHERE ' . $this->entity['apl']['alias'] . '.locale = ' . $locale->getId()
				. ' AND ' . $this->entity['apl']['alias'] . '.category IN(' . $ids . ')';

			$query = $this->em->createQuery($qStr);
			$query->getResult();
			return new ModelResponse(null, 0, 0, null, false, 'S:D:001', 'Selected entries have been successfully removed from database.', $timeStamp, time());
		}
		return new ModelResponse(null, 0, 0, null, true, 'E:E:001', 'Unable to delete all or some of the selected entries.', $timeStamp, time());
	}
1334828
function removeHandler(store, name, callback, context) {
  var event = store[name];
  if (
     (!callback || (callback === event.callback || callback === event.callback._callback)) &&
     (!context || (context === event.context))
  ) {
    delete store[name];
    return true;
  }
}