Delete translation by key .

@param $key
@param null $group
@param null $locale
@param null $driver
@return mixed
@throws TranslatorException
12797
public function delete($key, $group = null, $locale = null, $driver = null) {
        $driver = ! is_null($driver) ? $this->getDriver($driver) : $this->driver();

        return $driver->delete(
            $key, $group, $locale
        );
    }
1300447
public function getFrom($group, $locale, $default = null)
    {
        if ( ! $this->hasCollection($group))
            return $default;

        $locales = $this->getCollection($group);

        return $locales->get($locale, $default);
    }
1271633
public function clean($group = null)
	{
		$hash = $this->options['hash'];

		$index = $this->engine->get($hash . '-index');
		if ($index === false)
		{
			$index = array();
		}

		foreach ($index as $key => $value)
		{
			if (strpos($value->name, $hash . '-cache-' . $group . '-') === 0) // xor $mode != 'group')
			{
				$this->engine->delete($value->name, 0);
				unset($index[$key]);
			}
		}

		$this->engine->replace($hash . '-index', $index, 0);
	}
944050
public function delete($lang, $id)
    {
        // check if user has permissions to access this link
        if(!User::hasAccess('Permissions', 'delete')) {
            return $this->noPermission();
        }

        DB::statement('SET FOREIGN_KEY_CHECKS=0');
        $group = \App\Models\UserGroup::find($id)->delete();
        if($group) {
            DB::table('permissions')->where('groupID', $id)->delete();
            $result = $this->response('Group is deleted');
        }else{
            $result = $this->response('Internal server error. Please try again later', 500);
        }
        return $result;
    }
1332480
public String remove(String group, String key) {
		group = StrUtil.nullToEmpty(group).trim();
		writeLock.lock();
		try {
			final LinkedHashMap<String, String> valueMap = this.get(group);
			if (MapUtil.isNotEmpty(valueMap)) {
				return valueMap.remove(key);
			}
		} finally {
			writeLock.unlock();
		}
		return null;
	}
1115361
public function deleteTranslation($key, $language = null) {
		if($language === null) {
			$languages = $this->getLanguageList();
		}
		else {
			$languages = array($language);
		}
		foreach ($languages as $language) {
			$messageFile = $this->getMessageFile($language);
			$messageFile->deleteMessage($key);
			$messageFile->save();
			
			unset($this->messages[$language][$key]);
		}
	}
223968
public function getByKey($key, $group = null) {
        $query =  $this->model
            ->where('key', $key);

        if(! is_null($group))
            $query->where('group', $group);

        return $query->get();
    }
888660
public function translate(string $key, ?string $lang = null): ?string
    {
        try {
            // Validate key
            $key = strtolower($key);
            if (!preg_match('/^[a-z0-9\.\-\_]+$/', $key)) {
                throw new TranslatorException('Invalid translation key');
            }

            // Get current language
            $language = $this->_language($lang);
            $translation = $language->get($key);

            if ($translation) { // Translation found
                return $translation;
            }

            // Fallback
            try {
                $fallback = $this->_fallback();
            } catch (LanguageException $e) {
                throw new LanguageException('[Fallback] ' . $e->getMessage());
            }

            if ($fallback && $fallback->name() !== $language->name()) {
                $translation = $fallback->get($key);
                if ($translation) {
                    return $translation;
                }
            }
        } catch (TranslatorException $e) {
            trigger_error(sprintf('Translation error [%s]: %s', $key, $e->getMessage()), E_USER_WARNING);
        }

        return null;
    }
1085748
public function getByKey($key, $locale, $group = null) {
        $query = $this->source
            ->select('languages.slug as locale', 'translations.*')
            ->join('languages', 'languages.id', '=','translations.language_id')
            ->where('languages.slug', $locale)
            ->whereKey($key);

        if($group)
            $query->where('group', $group);

        return $query
            ->first();
    }
52043
public function delete(string $projectKey, string $id, string $locale)
    {
        $response = $this->httpDelete(sprintf('/api/translations/%s/%s?key=%s', rawurlencode($id), $locale, $projectKey));
        if (!$this->hydrator) {
            return $response;
        }

        if (200 !== $response->getStatusCode()) {
            $this->handleErrors($response);
        }

        return $this->hydrator->hydrate($response, TranslationDeleted::class);
    }
180015
public static function delete($key, $group = NULL)
	{
		$result = FALSE;
		try {
			!self::classExists() or $result = self::instance($group)->delete($key);
		} catch (Cache_Exception $e) {
			self::exception($e);
		}

		return $result;
	}
1026393
public function deleteAction(Request $request, $key, $domain)
    {

        $form = $this->createDeleteForm($key, $domain);
        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
            $translation = $this->get('asm_translation_loader.translation_manager')
                ->findTranslationBy(
                    array(
                        'transKey' => $key,
                        'transLocale' => $request->getLocale(),
                        'messageDomain' => $domain,
                    )
                );
            $this->get('asm_translation_loader.translation_manager')->removeTranslation($translation);
            $this->get('session')->getFlashBag()->add('success', 'translation.deleted');
        }

        return $this->redirectToRoute('core_translation_index');
    }
1203552
public function removeEntryAction($locale, $domain, $key)
    {
        $this->securityCheck($domain, $locale);

        $this->getSessionImporter()->remove($domain, $key, $locale);
        $session = $this->getSession();
        $session->getFlashBag()->set('success', 'Entry removed');

        return $this->redirect($this->generateUrl('liip_translation_import'));
    }
535173
public function deleteTranslations( $locales = null )
    {
        if( $locales === null )
        {
            $this->translations()->delete();
        }
        else
        {
            $locales = (array)$locales;
            $this->translations()->whereIn( $this->getLocaleKey(), $locales )->delete();
        }

        // we need to manually "reload" the collection built from the relationship
        // otherwise $this->translations()->get() would NOT be the same as $this->translations
        $this->load( 'translations' );
    }
22531
public function load($locale, $group, $namespace = null)
    {
        if ($locale != $this->defaultLocale) {
            return array_replace_recursive(
                $this->loadSource($this->defaultLocale, $group, $namespace),
                $this->loadSource($locale, $group, $namespace)
            );
        }
        return $this->loadSource($locale, $group, $namespace);
    }
403422
protected function getTranslation(string $key, string $locale)
    {
        return $this->translations()
            ->where('key', $key)
            ->where('locale', $locale)
            ->value('translation');
    }
464098
public function trans($key, array $args = [], $lang = null)
    {
        return $this->translate($key, $args, $lang);
    }