Basic examples (2)
? StzLocaleQ("ru_RU").Country()russia
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 86_country.ring(opens in a new tab)
o1 = new stzLocale("en-US")
? o1.Abbreviation()
? o1.Abbreviation()
? o1.Country()en_US en_US united_states
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 84_abbreviation.ring(opens in a new tab)
Scope (7)
o1 = new stzLocale([ :Country = "Niger" ]) ? o1.Abbreviation() ? o1.LanguageName() ? o1.CountryName()
fr_NE french niger
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 72_abbreviation.ring(opens in a new tab)
o1 = new stzLocale("pt_Latn_BR")
? o1.Abbreviation()
? o1.language()
? o1.Script()
? o1.Country()pt_BR portuguese latin brazil
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 69_abbreviation.ring(opens in a new tab)
o1 = new stzLocale([ :Language = "portuguese", :Script = "Latn", :Country = "BR" ]) ? o1.Abbreviation() ? o1.LanguageName() ? o1.CountryName() ? o1.CountryNumber()
pt_BR portuguese brazil 30
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 70_abbreviation.ring(opens in a new tab)
# fr alone is not a locale
? Q("fr").IsLocaleAbbreviation()
# fr-fr is
? Q("fr-fr").IsLocaleAbbreviation()
# and its country reads france
? StzLocaleQ("fr-fr").Country()0 1 france
run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 842_islocaleabbreviation.ring(opens in a new tab)
o1 = new stzLocale([ :Language = "romanian" ]) ? o1.Abbreviation() ? o1.Abbreviation() + NL ? o1.LanguageNumber() ? o1.LanguageName() + NL ? o1.CountryNumber() ? o1.CountryName()
ro_RO ro_RO 95 romanian 177 romania
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 71_abbreviation.ring(opens in a new tab)
o1 = new stzLocale("ar-Arab") # Default arabi country is egypr
? o1.CountryName()
o1 = new stzLocale("AR-Arab-tn")
? o1.CountryName()
o1 = new stzLocale("AR-tn")
? o1.CountryName()
o1 = new stzLocale("TN-Arab") # TN here means the TswaNa language in South Africa!
? o1.CountryName()
? o1.Language()egypt tunisia tunisia south_africa tswana
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from from_string_841_pr.ring(opens in a new tab)
o1 = new stzLocale([ :Language = "french", :Country = "Mali" ]) ? o1.Country() ? o1.Langauge() ? o1.Script() + NL o1 = new stzLocale([ :Language = "ara", :Script = "arabic" ]) ? o1.Country() ? o1.Langauge() ? o1.Script() + NL o1 = new stzLocale([ :Country = "brazil", :Script = "latin" ]) ? o1.Country() ? o1.Langauge() ? o1.Script() + NL o1 = new stzLocale([ :Country = "Spain", :Language = "Spanish", :Script = "latin" ]) ? o1.Country() ? o1.Langauge() ? o1.Script()
mali french latin egypt arabic arabic brazil portuguese latin spain spanish latin
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 68_country.ring(opens in a new tab)
The extensions of this method
Each extension, and whether it exists for this method; an extension that exists combines with the others (FindSTCS).
Every example is a test file of the library, run inside the library for this page; only those whose output kept every promise their file wrote are shown.
See also
- The class stzLocale
- The area's reference: Internationalization
- The other methods in these examples: stzLocale.Abbreviation · stzLocale.CountryNumber · stzLocale.LanguageName · stzLocale.LanguageNumber · stzLocale.ScriptName · stzString.IsLocaleAbbreviation

