### Method

# AppStream Component set_context_locale

#### Declaration [src]

    void
    as_component_set_context_locale (
      AsComponent* cpt,
      const gchar* locale
    )

#### Description [src]

Set the active locale on the context assoaiacted with this component, creating a new context for the component if none exists yet.

Please not that this will flip the locale of all other components and entities that use the same context as well! This function is just a convenience method, and does not replace proper `AsContext` management.

#### Parameters

`locale`

  Type: `const gchar*`

  The new locale.

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