Query localized items

You can query items that have a localized field in multiple cultures. You can query all items from a specific culture, for example all items translated in French.

In the following example, you query all dynamic items that have a localized field with a value that applies to a specific culture. To do so:

  1. Get an instance of the DynamicModuleManager class.
  2. Resolve the name of the dynamic content type using the TypeResolutionService class.
  3. Get the localized field name for the specified culture using the LstringPropertyDescriptor class.
    For example, a localized name for a field, called Title in French culture is Title_fr.
  4. Filter the data items by passing the localized field name for the culture and select the Master version using the ContentLifecycleStatus class.

As a result, you get a list of all items translated in the specified culture.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?