Method: Contentstack::Query#locale

Defined in:
lib/contentstack/query.rb

#locale(code) ⇒ Contentstack::Query

Get entries from the specified locale.

Example

Change language method
@query = @stack.content_type('category').query
@query.locale('en-us')

Parameters:

  • code (String)

    The locale code of the entry

Returns:



405
406
407
408
# File 'lib/contentstack/query.rb', line 405

def locale(code)
  @query[:locale] = code
  self
end