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

Function TranslatedRegionName

libs/i18n/localisation_translation.cpp:88–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88string TranslatedRegionName(storage::CountryId const countryId)
89{
90 auto nameGetter = platform::GetTextByIdFactoryForRegion(platform::TextSource::Countries, countryId);
91
92 if (!nameGetter)
93 return {};
94
95 string shortName = (*nameGetter)(countryId + " Short");
96 if (!shortName.empty())
97 return shortName;
98
99 string officialName = (*nameGetter)(countryId);
100 if (!officialName.empty())
101 return officialName;
102
103 return {};
104}
105
106string TranslatedBrand(string const translationKey)
107{

Callers 1

Calls 2

emptyMethod · 0.45

Tested by

no test coverage detected