Translations and Dynamic International Content
Once the locales have been set, you can add dynamic content and tag them with the appropriate locale to have Broadleaf display it when said locale has been selected.
Setting up a content can be done via direct table imports or through the admin.
Dynamic Content Setup - Direct Table Import
All dynamic content is source from one table - BLC_TRANSLATION
. This table is discriminated by Entity, EntityField, LocaleCode, and Site (when using the Multi-Tenant/Multi-Site module).
Translation Samples
Below are a few examples of direct table sql scripts adding locale specific content for select entities.
Category
INSERT INTO BLC_TRANSLATION (TRANSLATION_ID, ENTITY_ID, LOCALE_CODE, ENTITY_TYPE, FIELD_NAME, TRANSLATED_VALUE) VALUES (-1, 2001, 'es', 'Category', 'name', 'Inicio');
INSERT INTO BLC_TRANSLATION (TRANSLATION_ID, ENTITY_ID, LOCALE_CODE, ENTITY_TYPE, FIELD_NAME, TRANSLATED_VALUE) VALUES (-11, 2001, 'es', 'Category', 'description', 'Inicio');
Sku/Product
INSERT INTO BLC_TRANSLATION (TRANSLATION_ID, ENTITY_ID, LOCALE_CODE, ENTITY_TYPE, FIELD_NAME, TRANSLATED_VALUE) VALUES (-51, 1, 'es', 'Sku', 'name', 'Salsa de la Muerte Súbita');
INSERT INTO BLC_TRANSLATION (TRANSLATION_ID, ENTITY_ID, LOCALE_CODE, ENTITY_TYPE, FIELD_NAME, TRANSLATED_VALUE) VALUES (-52, 1, 'es', 'Sku', 'longDescription', 'Como mis amigos salseros saben, nunca soy fácil de satisfacer. Por lo tanto, nació la creación de la Muerte Súbita. Cuando este listo para saborear al más allá ... Muerte súbita entregará!');
Product Option / Option Value
INSERT INTO BLC_TRANSLATION (TRANSLATION_ID, ENTITY_ID, LOCALE_CODE, ENTITY_TYPE, FIELD_NAME, TRANSLATED_VALUE) VALUES (-31, 1, 'es', 'ProdOption', 'label', 'Color de Camisa');
INSERT INTO BLC_TRANSLATION (TRANSLATION_ID, ENTITY_ID, LOCALE_CODE, ENTITY_TYPE, FIELD_NAME, TRANSLATED_VALUE) VALUES (-41, 1, 'es', 'ProdOptionVal', 'attributeValue', 'Negro');
Search Facet
INSERT INTO BLC_TRANSLATION (TRANSLATION_ID, ENTITY_ID, LOCALE_CODE, ENTITY_TYPE, FIELD_NAME, TRANSLATED_VALUE) VALUES (-180, 1, 'es', 'SearchFacet', 'label', 'Fabricante');
Menu Item
INSERT INTO BLC_TRANSLATION (TRANSLATION_ID, ENTITY_ID, LOCALE_CODE, ENTITY_TYPE, FIELD_NAME, TRANSLATED_VALUE) VALUES (-197, 5, 'aes', 'MenuItem', 'label', 'Nuevo a la Salsa?');
For both Catalog and Content, there are many other entities/fields which were not included in the above examples.
Content Setup - Admin
In the Admin, content is managed on a field-by-field basis. Select fields are marked as "translate-able" and will have a "Translation" link next to the label. So an Admin User would navigate to the appropriate entity (e.g. Product) and click the link associated with the desired field (e.g. Product Name). A modal will appear allowing the Admin User to add locale specific content for any/all locale defined in the system