public function getLanguageId(string $shortCode): string
    {
        $query = $this->Languages->find('all', [
            'conditions' => ['Languages.code' => $shortCode]
        ]);
        $language = $query->first();

        if (empty($language->id)) {
            throw new InvalidArgumentException("Unsupported language code [$shortCode]");
        }

        return $language->id;
    }