EDataBook.BookCache.set_locale

### Method

# EDataBook BookCacheset_locale

since: 3.26

#### Declaration [src]

    gboolean
    e_book_cache_set_locale (
      EBookCache* book_cache,
      const gchar* lc_collate,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Relocalizes any locale specific data in the specified new `lc_collate` locale.

The `lc_collate` locale setting is stored and remembered on subsequent accesses of the cache, changing the locale will store the new locale and will modify sort keys and any locale specific data in the cache.

As a side effect, it’s possible that changing the locale will cause stored vCard-s to change.

Available since: 3.26

#### Parameters

`lc_collate`

  Type: `const gchar*`

  The new locale for the cache.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

Whether the new locale was successfully set.