Add wxUILocale::FromTag() helper

This is exactly the same as wxUILocale(wxLocaleIdent::FromTag()) but
shorter.
This commit is contained in:
Vadim Zeitlin
2021-09-05 00:59:28 +02:00
parent c217eb6815
commit 2c580c9190
3 changed files with 24 additions and 6 deletions

View File

@@ -106,6 +106,12 @@ public:
// Get the object corresponding to the currently used locale.
static const wxUILocale& GetCurrent();
// A helper just to avoid writing wxUILocale(wxLocaleIdent::FromTag(...)).
static wxUILocale FromTag(const wxString& tag)
{
return wxUILocale(wxLocaleIdent::FromTag(tag));
}
// Create the object corresponding to the given locale.
explicit wxUILocale(const wxLocaleIdent& localeId);