Xteink-X4-crosspoint-reader/lib/Epub/Epub/hyphenation/LanguageRegistry.h
Arthur Tazhitdinov ed3a427b64 refactor
2026-01-09 23:20:04 +05:00

27 lines
688 B
C++

#pragma once
#include <cstddef>
#include <string>
#include "LanguageHyphenator.h"
struct LanguageEntry {
const char* cliName;
const char* primaryTag;
const LanguageHyphenator* hyphenator;
};
struct LanguageEntryView {
const LanguageEntry* data;
size_t size;
const LanguageEntry* begin() const { return data; }
const LanguageEntry* end() const { return data + size; }
};
// Returns the Liang-backed hyphenator for a given primary language tag (e.g., "en", "fr").
const LanguageHyphenator* getLanguageHyphenatorForPrimaryTag(const std::string& primaryTag);
// Exposes the list of supported languages primarily for tooling/tests.
LanguageEntryView getLanguageEntries();