addLocale method

Future<void> addLocale({
  1. required String locale,
  2. String? direction,
})

Creates a new empty locale file.

Implementation

Future<void> addLocale({
  required String locale,
  String? direction,
}) async {
  await _requestJson(
    'POST',
    '/api/catalog/locale',
    body: <String, dynamic>{
      'locale': locale,
      if (direction != null) 'direction': direction,
    },
  );
}