initialize static method

void initialize(
  1. BuildContext context
)

Initializes the TranslateLocale with the current BuildContext.

This method should be called once at the start of the application to set the current locale after Material App build.

Implementation

static void initialize(BuildContext context) {
  locale = Localize.of(context);
}