xtd 0.2.0
Loading...
Searching...
No Matches
culture_info_properties.cpp

Shows how to use xtd::globalization::culture_info properties.

#include <xtd/xtd>
using namespace xtd::globalization;
auto main() -> int {
// Displays several properties of the neutral cultures.
console::write_line("CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME");
console::write("{,-11}", ci.name());
console::write(" {,-3}", ci.two_letter_iso_language_name());
console::write(" {,-3}", ci.three_letter_iso_language_name());
console::write(" {,-3}", ci.three_letter_windows_language_name());
console::write(" {,-40}", ci.display_name());
console::write_line(" {,-40}", ci.english_name());
}
}
// This code produces the following output :
//
// CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME
// af af afr AFK Afrikaans Afrikaans
// agq agq agq ZZZ Aghem Aghem
// ain ain ain ZZZ Ainu Ainu
// ak ak aka ZZZ Akan Akan
// ...
// zh zh zho CHS Chinese Chinese
// zh-Hans zh zho CHS Chinese, Simplified Chinese, Simplified
// zh-Hant zh zho ZHH Chinese, Traditional Chinese, Traditional
// zu zu zul ZUL Zulu Zulu
static void write(arg_t &&value)
Writes the text representation of the specified value to the standard output stream.
Definition console.hpp:462
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
static xtd::array< culture_info > get_cultures(xtd::globalization::culture_types types)
Gets the list of supported cultures filtered by the specified xtd::globalization::culture_types param...
@ neutral_cultures
Cultures that are associated with a language but are not specific to a country/region.
Definition culture_types.hpp:23
Contains classes that define culture-related information, including language, country/region,...
Definition culture_info.hpp:20