MCPcopy Create free account
hub / github.com/comaps/comaps / GetLanguages

Method GetLanguages

libs/indexer/feature.cpp:803–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801}
802
803std::vector<localisation::LanguageIndex> FeatureType::GetLanguages()
804{
805 auto const & mwmInfo = m_id.m_mwmId.GetInfo();
806 if (!mwmInfo)
807 return {};
808
809 auto regionData = mwmInfo->GetRegionData();
810 if (regionData.IsWorldLevel())
811 {
812 if (GetGeomType() == feature::GeomType::Point)
813 regionData.SetLanguages(RegionLocator::Instance().GetLocalLanguageIndexes(GetCenter()));
814 else
815 regionData.SetLanguages({localisation::kInternationalNameIndex, localisation::kEnglishLanguageIndex,
816 localisation::kDefaultNameIndex});
817 }
818
819 return regionData.GetLanguages();
820}
821
822localisation::NameTranslation FeatureType::GetTranslatedName()
823{

Callers 8

GetReadableNameMethod · 0.45
GetBestMatchNameMethod · 0.45
mainFunction · 0.45
GetNamesDataSourceMethod · 0.45
GetPreferredBookmarkStrFunction · 0.45
FillDescriptionsMethod · 0.45
TestAddressFunction · 0.45
CheckPlaceFunction · 0.45

Calls 6

GetCenterFunction · 0.85
GetRegionDataMethod · 0.80
IsWorldLevelMethod · 0.80
GetInfoMethod · 0.45
SetLanguagesMethod · 0.45

Tested by 2

TestAddressFunction · 0.36
CheckPlaceFunction · 0.36