locale method

void locale(
  1. String locale
)

locale is code of the language of which the entries needs to be included. Only the entries published in this locale will be fetched.

Example:

final stack = contentstack.Stack('apiKey','deliveryToken','environment');
final query = stack.contentType("contentTypeUid").entry().query();
query.locale('en-eu');

Implementation

void locale(String locale) {
  queryParameter['locale'] = locale;
}