Jaa


How to Add a Language to a Catalog

You can add a language to a catalog. You can then set this language as the active language for the catalog. You can also set this language as the default language for the Catalog System.

To add a language to a catalog

  1. Use one of the GetCatalog methods on the CatalogContext object to get the specified catalog.

  2. Use the AddLanguage method on the ProductCatalog object to add the specified language to the catalog.

  3. Save the changes to the Catalog System.

Example

The following example adds a language to a catalog. It first gets the "Books" catalog. It then adds German as a language on the catalog and saves the changes to the Catalog System.

public static void AddNewLanguage(CatalogContext context)
{
    // Get the "Books" catalog.
    ProductCatalog catalog = (ProductCatalog)context.GetCatalog("Books");
    
    // Add German to the catalog.
    catalog.AddLanguage("de-DE");

    // Save the changes.
    catalog.Save();
}

See Also

Other Resources

How to Manage Multilingual Catalogs