Working with Multiple Languages

SmartStore.NET already comes with two languages in the box (English and German), but you can add an unlimited number of further languages. The default language is the one you've chosen during the installation process.

 

How to Add a Language

To add another language, navigate to Configuration > Regional Settings > Languages and click on New.

250px|Input FieldDescription
NameThe name of the language. This name will be displayed when a user hovers over the flag in the frontend, where he can choose his preferred language.
Language cultureThe language-specific culture. The culture information includes the names for the culture, the writing system, the calendar used and formatting for dates and sort strings.
Unique SEO codeThe unique two-letter SEO code. It's used to generate URLs such as 'http://www.yourStore.com/en/' when you have more than one published language. 'SEO friendly URLs with multiple languages' option should also be enabled.
Flag image file nameThe flag image file name. You can choose an image from the flags that are shown when you click on the link Show. If you want to use another image, it should be saved into the /images/flags/ directory.
Right-to-leftSelect this option to enable right-to-left support for this language. The active theme should support RTL (i.e. it should have the appropriate CSS style file). This affects only the front end of your store.

 

After you've created the desired language, you need to add the resources for this language by clicking on Import Resources, where you can choose an XML-file to import. You can find the resource xml file for English and German in the directory /App_Data/Localization/App.

 

For More Languages Visit Our Marketplace

If you want to offer a product catalog in your local language and don't want to translate every textual resource yourself, take a look at the SmartStore Community Marketplace to check if the language is already available for download.

 

How to Add or Edit a Single Resource

Sometimes, you may want to alter single resources. Let's say you want to amend the link to the forum in the header menu from Forums to Message Boards. To do so, navigate to Configuration > Regional Settings > Languages and click on View String Resources. You will see a grid showing all the resources added for this language. Filter the entries to find the resource you are looking for. You can either filter by text value or by the resource name used for internal identification. Since you know the text you want to alter, click on the filter icon of the column Value, choose is equal to and enter the value Forums. At this point, a list of several resources matching the filter criteria will be displayed. One of them has the prefix admin, indicating that it belongs to the administration area, and the other contains the word pagetitle, indicating that it is a page title - neither of these are the resource you're looking for. The resource to be edited is the one named forum.forums.  


Localized Entities

There are numerous entities in SmartStore.NET where you can enter data to be displayed to the user such as product names, product descriptions and several display names (e.g. delivery time display name, quantity unit display name, etc.). Whenever such a value can be entered in the backend, there will be a language management control that allows you to enter this data in all the languages configured in your store. In this control, you can enter the alternative resources for specific languages as well as a default value which will be displayed when no alternative resource for the language chosen by your customer has been specified.

Language Chooser

When you've configured multiple languages, your users can choose one of them in the header section of your frontend. 

Translating Resources

You can find several languages in our SmartStore Community Marketplace. However, if the language you want isn't there, you may need to create the translation yourself. To do so, it's recommended that you export all language resources of an existing language into an XML-file, translate them all and import the file again. Textual resources for plugins should be located in the designated xml files in the respective plugins. For more information about plugin resources, read the topic How to Write a Plugin.