Skip to content

Culture, Locale & Language

As of 2025-08, Majority supports two languages fully: Spanish (es) and English (en). French (fr) is also considered a supported language, but only limited translations are available, and new content is not translated into French.

Some pointers:

  • A user has a Locale set on their profile. This Locale, published by the user area:

    - Is always one of the supported Majority languages (e.g., "Majority Locale")
    - Is of type nvarchar(12)
    - Is safe to use for translations or other locale usages
    - It is not safe to assume it is in the format xx-YY; for example, es-419 is a valid Majority Locale.

  • When backend services call each other, the Accept-Language header is automatically forwarded.
  • The Accept-Language header is automatically parsed and set as the current culture on the thread/task (Thread.CurrentThread.CurrentUICulture).
  • If you need to translate something, prefer to use the methods in Majority.Platform.Localization; they will read the Thread.CurrentThread.CurrentUICulture and translate accordingly.

    - However, remember that when you are in an Event Handler, the CurrentUICulture will not be set to the user's preferred locale. Instead, you need to get the locale from the User area.

  • The string in the Accept-Language header is actually very complicated. Do NOT try to parse this into a language or similar unless you know what you are doing!

    - If you need a Majority Locale from a request, use the helper classes in the platform Majority.Platform.Localization.
    - If you really need to parse it, make sure to handle all the strange cases in the standard (Accept-Language and bcp47)

  • Currently, there are two projects: Rebtel.Core.Infrastructure.Localization and Majority.Platform.Localization. The Rebtel one is deprecated.