File indexing completed on 2024-05-12 04:42:08
0001 /* 0002 SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org> 0003 SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #ifndef KOSMINDOORMAP_LOCALIZATION_H 0007 #define KOSMINDOORMAP_LOCALIZATION_H 0008 0009 class QByteArray; 0010 class QString; 0011 0012 namespace KOSMIndoorMap { 0013 0014 /** Translations of various OSM tag values. */ 0015 namespace Localization 0016 { 0017 0018 /** Control how unknown elements get translated. */ 0019 enum TranslationOption { 0020 ReturnUnknownKey, 0021 ReturnEmptyOnUnknownKey 0022 }; 0023 0024 /** Returns @c true if we can translate @p value. */ 0025 bool hasAmenityTypeTranslation(const char *value); 0026 0027 /** Translated name for an amenity tag value (after list splitting). 0028 * This also covers values of similar/overlapping tags (office, tourism, leisure, historic, room, building, etc). 0029 */ 0030 QString amenityType(const char *value, Localization::TranslationOption opt = Localization::ReturnUnknownKey); 0031 0032 /** Translated values of the cuisine tag (does list splitting). */ 0033 QString cuisineTypes(const QByteArray &value, Localization::TranslationOption opt = Localization::ReturnUnknownKey); 0034 } 0035 0036 } 0037 0038 #endif // KOSMINDOORMAP_LOCALIZATION_H