B
B
BonBon Slick2021-03-22 18:40:57
Software design
BonBon Slick, 2021-03-22 18:40:57

Locale or language associated with country en_gb / en_us?

Parse
3 entities, Locale, Language, Country
ru_ru ru_
= 2 character language code
_ru = 2 character country code

You can get it like this

Langauge->getLangaugeCodeWithCountryCode() : string { 
  return $this->code . '_' . $this->language->country->code;
}
...
Locale->language->getLangaugeCodeWithCountryCode();


All the harm would be clear, but where to put getLangaugeCodeWithCountryCode when we have

en_gb
en_us like this The

question is, is English or any other common language considered different if it is used in another country?

So it's a different English language, right? Or the locale should contain the country, not the language.
That is, the language is English 1 en, and the locale already has a country, such as local English for the country.
Locale->getLangaugeCodeWithCountryCode() : string { 
  return $this->language->code . '_' . $this->country->code;
}
...
Locale->getLangaugeCodeWithCountryCode();

Same with Spanish for example, there is es_es and there is Mexican Spanish which is slightly different from the original.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2021-03-22
@BonBonSlick

en_us
en_gb
They differ, there are a lot of different things. So take control

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question