Child pages
  • Understanding Local Settings
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 32 Next »

Table of content

Understanding Local Settings

As obvious as it might seem, this is the Internet, and people from all over the world will certainly visit your shop, and order your products. As a shop owner, you must cater for as many customers as possible. This means having your website fully translated in as many languages as necessary, with local taxes, weights and currency units, local geographical zones, etc.

The "Localization" menu appeared with PrestaShop 1.5, and brings together many local settings and tools that used to be scattered in other menus in previous versions.

Localization

The main page under the "Localization" menu enables you to configure the units used for your products.

Import Localization Pack

This section provides you with an extensive list of existing localization packs which you can import. Not only does it set your PrestaShop install with your proper local units, but it also adds many other data:

  • States. When shipping product to a country, knowing which state it is sent to can prove important, as this might have an impact on local customs and taxes. The added states can be viewed and edited in the "States" page under the "Localization" menu.
  • Taxes. The real importance of localization is local taxes, and they can be numerous and varied depending on the country or the state. PrestaShop provides you with a basic support for the major taxes and tax rules. The added taxes and tax rules can be viewed and edited in the "Tax" and "Tax rules" pages under the "Localization" menu.
  • Currencies. Foreign customers will appreciate to be able to convert the prices on your shop into their own currency. You should at least have US dollars and Euros available along of your country's own currency (if not one of those two). Once added, you must activate a new currency using the "Currencies" page under the "Localization" menu, and make sure the conversion rate is correct. The added currencies can be viewed and edited in that "Currencies" page.
  • Languages. All the public fields on your shop can be created in multiple languages, and it is important you do so for your products name and description, at the very least. Note that importing a language also imports its date format (d/m/Y, m/d/Y, d.m.Y, ...), among other things. The added languages can be viewed and edited in that "Languages" page under the "Localization" menu.
  • Units. Weight, dimension, volume, distance: these units are essential in order to correctly describe a product to your customer, and for your own packaging information. They can be viewed and edited on this very page, in the "Localization" section.

As you can see, these additional data are optional: you can choose to import the currency and language for a given country, and not its taxes, for instance.

While you should not add too many local data for fear of overwhelming both yourself and your customers with it, it may be useful to import the localization pack for your most visited countries (according to your stats).

Apart from the default units, you cannot automatically remove all the data for a given country; if you need to remove data, you will have to do so manually, in their respective pages under the "Localization" menu.

Configuration

This section groups four default local settings, of prime importance:

  • Default language. This is the main language for your shop. This setting will influence your back-office's language (including the main language for your products), as well as the front-office. Note that the front-office's language might adapt to the setting of the customer's browser.
  • Default country. The location of your business. If you have headquarters in many countries, use your main or original country.
  • Default currency. The currency in which your product's prices are first set. Currencies are added by importing and activating a country's currency. Note that if you change currency after having already set a few product prices, you will have to manually update all the existing prices. Make sure to set that value once and for all.
  • Time Zone. You own time zone. This is useful for daily discount for instance: you know exactly when it starts and ends.

Localization

The physical units presented in this section (weight, distance, volume, dimension) are used both in your product sheets and for your own packaging needs – and ultimately, is essential in your relationship with your carrier.

These values can be set when you import the localization package for a country, but you can edit manually them afterwards. For instance, if you would rather have centiliters instead of liters for the volume unit, change the default "L" to "cL".

The values should be unit symbols from the International System of Units (http://en.wikipedia.org/wiki/International_System_of_Units).

Advanced

This last section asks you to set your server's local language and country, as ISO code:

These values can be set when you import the localization package for a country, but you can edit manually them afterwards.

Languages

PrestaShop comes multilingual out of the box: there are 5 default languages (English, French, Spanish, Deutsch and Italian), and many more are available to download.

The "Languages" page manages the languages you will see in your back office and your shop.

The page displays the languages already installed on your shop, along with some information: ISO code, language code, date format (short and full). You can enable or disable a language by clicking on the icon in the "Enabled" column.

Adding a new language is simply a question of importing the localization pack from a country which uses that language (in the "Localization" page). If it turns out this does not work, or that you need something customized, you can add a new language manually, using the form behind the "Add new" button.

Creating A New Language

Creating a new language means you will have to translate all of the text for PrestaShop's front-end, back-end, modules, etc., or risk using the default English strings. Translation is made using the tool in the "Translations" page, under the "Localization" menu.

You can also create a new language in order to cater for a language pack that you would have downloaded from the PrestaShop site.

In order to create a new language, you must fill as many of the form's field as possible:

  • Name. The name is public. If you are creating that language for regional purpose, you may indicate that in the name: "French (Quebec)", for instance.
  • ISO code. Enter the adequate 2-letter ISO 639-1 code. See http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for more information.
    If you are importing a language pack, this code should exactly match the one for the pack.
  • Language code. Enter the adequate 4-letter languages code, in the form xx-yy, xx being the language ISO code (same as above), and yy the country ISO code, using ISO 3166-1 alpha-2 (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). See http://en.wikipedia.org/wiki/IETF_language_tag for more information.
  • Date format. Countries do not always share the same date representation (See http://en.wikipedia.org/wiki/Date_format_by_country). Hence, when your shop display 02/08/12, a customer from France will understand "August 2nd, 2012" whereas one from the US will understand "February 8th, 2012" – and a japan customer might even read it as "August 12th, 2002". This is why it is important to indicate the date format tied to your language. The letters used should be that of PHP's date() function: http://php.net/manual/en/function.date.php.
  • Date format. Same as the date format above, but including the hour-minute format.
  • Flag. Upload an image of the flag which best matches the language you want to add. It should be 16*11 pixels. You recommend you use the free FamFamFam Flags image set: http://www.famfamfam.com/lab/icons/flags/.
  • No-picture" image. Upload an image which will be displayed when a product does not yet have a picture. That image is simply a blank image, with "No image" or "No image available" in this language. The picture should be 250*250 pixels. You can find existing "No-picture" images in the /img/l directory of your PrestaShop installation.
  • Is RTL language. Some languages are written from right to left, most notably those using Arabic script or the Hebrew alphabet (http://en.wikipedia.org/wiki/Right-to-left). When a PrestaShop theme is well coded, it is able to handle RTL languages - provided it is clearly set as such.
  • Status. You may disable a new language until you are ready to translate everything.
  • Shop association. You can make the language only available to a selection of your shops, for instance shops that target a specific locale.

Once your language is saved and enabled, you can import its language pack. This is done in the "Translations" page, under the "Localization" menu. Use the "Import a language pack manually" tool.

Finally, make sure everything works: go to your shop's front-office and click on the flags at the top. Similarly, customers can now select an additional language by using these icons.

Zones

PrestaShop's zones are a list of the world's subregions (http://en.wikipedia.org/wiki/Subregion). It helps categorize countries.

If needed, you can create more zones: click on "Add New" to display the creation form.

All you need is a name and a status, for instance indicating that you do not allow deliveries in Oceania.
When in multistore mode, you can also associate a zone with a selection of stores.

Countries

Your PrestaShop installation must know all existing countries in order for your customers to clearly indicate where in the world they live.

There are roughly 195 countries in the World, but PrestaShop has 244 registered. This is because some countries include overseas regions are part of the country proper.
For instance, the French departments formerly known as DOM (Guadeloupe, Martinique, Mayotte, Reunion, and French Guiana) nowadays have equals status as the French metropolitan region. Likewise, Alaska and Hawaii are US States proper.
Still, sending a package to Guadeloupe does not mean sending it to France, if only for the shipping fees. Therefore, the list of countries in PrestaShop actually separates the country from the mainland.

Be default, only your own country is enabled. You should enable them one by one, as needed for your customers. If you are unsure which to enable, check your stats to see the countries with most visitors.

At the bottom of the list, the "Country options" section to only display on your front-office the countries that your carriers cover. We recommend that you enable this setting, as it prevents customers from having to scroll through all the country names to find their own.

Adding A New Country

Normally, PrestaShop comes with all current countries in the database. But in the case new ones are created, you would need to add a new country.

  • Country. The official name of the country that you would like to add, in all supported languages. Check the country's Wikipedia page if unsure about the name.
  • ISO code. The country's ISO-3166 code, which you can find on the official ISO page: http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm.
  • Call prefix. Its international call code, which you can find on this Wikipedia page: http://en.wikipedia.org/wiki/List_of_country_calling_codes.
  • Default currency. You can use your shop's default currency (as set in the "Localization" page, under the "Localization" menu), or one of the other installed currencies. Remember that if needed, you can add a new currency to your shop using the "Currencies" page.
  • Zone. The world's subregion to which this country is attached. If necessary, you can add new zones using the "Zones" page, under the "Localization" menu.
  • Need zip code. Indicates whether a user living in this country must give a zip code or not when signing up to your shop.
    • Zip code format. You may also give more detail on the format of the postal code (or zip code). If you do not put anything, PrestaShop will not verify the validity of the zip code when given a new address for this country.
      Use the following codes for the postal code: "L" for one letter, "N" for one number and "C" for the country's ISO code (the one which you entered in the ISO field above).
      If you do not know the country's postal code format, you can rely on this Wikipedia page http://en.wikipedia.org/wiki/List_of_postal_codes. Make sure you do NOT copy/paste the notation from Wikipedia, but to adapt it! For instance, Wikipedia indicates "AAA 9999*" for Malta, so the notation for PrestaShop becomes "LLL NNNN" (without the final *).
  • Address format. Give details about the address layout, when displaying it to customers. You can click on the various helper links on the side of the text-field in order to add more fields. In live usage, they are automatically replaced by PrestaShop with the data from the customer's account.
    Your changes are only saved when you save the whole page. If you have made a mistake, you can make use of one of the four helper buttons at the bottom of the form, depending on your situation.
  • Status. A disabled country will not be suggested as an option when a visitor wants to register and create a new account.
  • Contains states. Indicates whether the country has "states" or not. This adds a new field to the PrestaShop address form. Note that "states" can be regions, provinces, departments... anything that makes sense to that country's postal service.
  • Need Tax identification number? and Display tax label (e.g. "Tax incl."). A Tax Identification Number is an identification number used by the country's revenue service in the administration of tax laws. Not every country needs of even has such a number for business. Inquire about this with the country's revenue service.
  • Shop association. You can make the country only available to a selection of your shops, for instance shops that target a specific locale.

States

By "States", PrestaShop calls first-level administrative divisions of a country. In the United-States, they are called states; in Italy, it is regioni (singular: regione); in France, it is régions; in the United-Kingdom, it is regions. By default, PrestaShop provides you with a set of states: the 50 US states, the 13 Canadian provinces and territories, 24 Argentinian provincias, and 110 Italian province (singular: provincia).

Having states properly defined in your database helps better represent the delivery possibilities of your carriers. These states can also be essential for tax rates calculation, depending on the country. It is therefore important to enter all of a given country's administrative divisions if they are important to your carriers. You can find a list of such divisions on this Wikipedia page: http://en.wikipedia.org/wiki/Table_of_administrative_divisions_by_country.

The PrestaShop address form currently only lists states which are available for the customer to choose. Therefore, make sure to use a sensible list when adding content to your states list. That is the reason why, for instance, the list contains Italian province rather than regioni.

Adding A New State

Let's create a new state. Click the "Add New" button to get to the creation form.

  • Name. The name of the state, as it should be displayed on invoices and the package. It should therefore be in the language of the state's country.
  • ISO code. The state's ISO-3166-2 code:
    1. Go to this Wikipedia page: http://en.wikipedia.org/wiki/ISO_3166-2,
    2. Click the state's country two-letter code (in the "Entry" column of the main table),
    3. On that page, find the state's code (it should be in a list on the page, or in the text for the smallest countries),
    4. If there is one, remove the country's prefix in order to keep the code under 4 characters. For instance, the full ISO 3166-2 for Devon, in the United Kingdom, is "GB-DEV". Simply use "DEV" as the state's ISO code – it already is attached to the country using PrestaShop's "Country" drop-down list (see next step).
  • Country. Indicate its country using the drop-down list.
  • Zone. Indicate its geographical zone using the drop down list. Pay attention not to use the wrong zone, as this can mix up PrestaShop's country and zone settings.
  • Status. A disabled state will not be suggested as an option when a visitor wants to register and create a new account.

Currencies

PrestaShop can accept a large number of currencies. By default, there is only one standard currency: the one for your country. However, you must add and configure new currencies depending on your customers' needs. Indeed, customers will appreciate the ability to display your shop's prices in their country's currency.

The two sections at the bottom of the "Currencies" page are very simple yet essential, as relate to your currencies exchange rates (or "conversion rates"). To quote Wikipedia, "In finance, an exchange rate between two currencies is the rate at which one currency will be exchanged for another. It is also regarded as the value of one country’s currency in terms of another currency." Rates change daily, sometimes drastically depending on current events, and your shop should always be updated to the latest values.

Updating The Currency Rates

In PrestaShop, there are two ways to update your conversion rates:

  • Manually. In the "Currency rates" section, click on the "Update currency rates" button. This will download the update file from the PrestaShop.com servers using PrestaShop web-service.
  • Automatically. This is the recommended way. Instead of having to click on the "Update currency rates" button once or thrice a day, you can create a cron task that will trigger the rate file download as often as you feel necessary. Add the provided URL to your crontab file in order to activate automatic update. If you do not know what a cron task or a crontab file is, contact your hosting provider.

Note that the rates are provided as-is: the PrestaShop team does pay attention to have correct rates in these file, but might slightly differ from the actual ones, if only because these rates can fluctuate greatly in a short time.

Adding A New Currency

The easiest way to add a country's currency is to import its localization package. This is done in the "Localization" page, under the "Localization" menu. Once import, you must go the "Currencies" page to enable it.

You might need to add a currency not featured in any the localization packages. In that case, you can use the creation form.

  • Currency. The name of the currency, preferably in English that as many customers as possible can read it.
  • ISO code. The currency's three-letter ISO 4217 code. See this Wikipedia page: http://en.wikipedia.org/wiki/ISO_4217.
  • Numeric ISO code. Its three-digit code ISO 4217 code. Same Wikipedia page as above.
  • Symbol. The currency's symbol, if any. See this Wikipedia page: http://en.wikipedia.org/wiki/Currency_sign.
  • Conversion rate. This rate is to be defined according to your shop's default currency. For example, if the default currency is the Euro and this currency is dollars, type "1.29", since 1€ usually is worth $1.29 (at the time of this writing). Use the converter here for help: http://www.xe.com/ucc/.
  • Formatting. Set up how you want your price to be displayed. The X corresponds to the currency's symbol. You have five possibilities.
  • Decimals. You can indicate whether your shop should display decimals. While you may choose to have all your prices be a round number, discounts and other price variations might warrant decimals. You can prevent them with this option.
  • Spacing. Once you have chosen the currency's formatting, you can choose whether to have a space character between the symbol and the price itself. Some languages require this. For instance, Spanish people would use "50€" whereas French people would use "50 €". Choose whichever you feel is best.
  • Enable. Any currency can be disabled at any time, both from its own edit page, and the currencies table on the "Currencies" page.
  • Shop association. You can make the currency only available to a selection of your shops, for instance shops that target a specific locale.

Taxes

Taxes are a complex subject, which should be fully understood as it can have a significant impact on your product prices or your shipping fees. While this user-guide is not meant to teach all the ins-and-outs of taxes, we will try our best give you pointers.

Taxes are "compulsory contribution to state revenue, levied by the government on workers' income and business profits or added to the cost of some goods, services, and transactions". In short, every product you sell is subject to sales taxes, which depend on your state's tax laws. In effect, you contribute to your state or government functioning (public goods and services) with a percentage of all your sales, as defined by local tax rates.

There are hosts of tax rates in the World, and they vary considerably from one country to another, and even within a single country if it has federal states (USA, Germany, Spain, Russia...). You should therefore make sure to strictly conform to your country's tax laws, and even those of your state or town if they apply to you. Check with your local tax representative as soon as possible in order to get all the official details.

By default in PrestaShop, a tax applies to all countries/states/zones. If order to apply a specific tax rate for a single country or a set of countries (and not some others), you must create a tax rule. The tax rule is then applied on a per-product basis, during the creation of the product ("Prices" tab).

You cannot directly apply a tax to a product; you can only apply tax rules. Therefore, you must first register all relevant taxes, and then create a tax rule for that tax in order to specify the countries the tax applies, and finally set the tax rule to the product.

Tax Options

At the bottom of the page is the "Tax options" section. These options apply to the whole shop, and all of the orders.

  • Enable tax. Whether or not taxes are included in each purchase.
  • Display tax in cart. You might prefer the customer not to be aware of the taxes that are applied to the order. In that case, disable this option.
  • Base on. The customer can choose to have the product not delivered at the same address as the one the order invoice should be sent to. This can have a great impact on taxes. By default, PrestaShop bases its tax rates on the delivery address, but you can choose to have them based on the billing address.
  • Use ecotax. The ecotax refers to "taxes intended to promote ecologically sustainable activities via economic incentives". It is a tax that shop owners pay in order to "feel the social burden of their actions". Learn more about ecotax on this Wikipedia page: http://en.wikipedia.org/wiki/Ecotax.
    Once you have enabled the use of ecotax, all your products' back-office page will feature an "Eco-tax (tax incl.)" field in their "Prices" tab. You should fill that field with the exact value of the tax, which depends on your country's tax laws (it is probably based on the product's price).

If you decide to enable the ecotax after having added products, you will have to edit them all in order to set the tax properly for each product.
Note that if you have set ecotaxes for your products already, and that you choose to disable ecotax, then all your products will lose their ecotax settings. Re-enabling the ecotaxe will mean having to set all your products' ecotaxes again.
The ecotax will also appear to the customer, on the product's page.

Adding A New Tax

Adding a new tax is very easy, because tax rules take out all the burden of having to specify the countries where the tax applies. The tax creation form is therefore very short:

  • Name. Be very specific, as this will help you build tax rules faster.
    It is a recommended to add reminders within the name, such as the country/group/zone the tax applies to, and its rate. This greatly helps you remember which tax is to be used in a tax rule.
  • Rate. The exact rate, in the XX.XX format.
  • Enable. You can disable and re-enable a tax at any time.

Tax Rules

Tax rules make it so that taxes are only applied to select countries.

By default in PrestaShop, a tax applies to all countries/states/zones. In order to apply a specific tax rate for a single country or a set of countries (and not some others), you must create a tax rule. The tax rule is then applied on a per-product basis, during the creation of the product ("Prices" tab).

You cannot directly apply a tax to a product; you can only apply tax rules. Therefore, you must first register all relevant taxes, then create a tax rule for that tax in order to specify the countries the tax applies, and finally set the tax rule to the product.

A few sample taxes rules are already in place, which depend on the country you chose for your shop during the installation of PrestaShop. The tax rules are set for each tax: the rules actually serve as a kind of country filter, limiting the use of that tax to a specific set of countries.
You should edit a couple of the presented rules in order to get a better grasp of how tax rules can be set.

Adding A New Tax Rule

You can add as many tax rules as needed to your PrestaShop installation. Not only that, but you should make sure that all of the needed tax rules are registered in your shop.

Creating a new tax rule is done in two steps:

  1. Create the tax rule:
    • Click on the "Add new" button.
    • In the form that appears, name the rule. Use a telling name: use the tax rule's country code, its name, maybe even its rate, so as to find it again easily. If PrestaShop already has tax rules for the target country, use their name as inspiration so as to have some consistency.
    • Select whether the rule should be enabled from the get-go or not. You can enable it later if needed.
    • Click the "Save and stay" button. The page reloads, with a table header at the bottom.
  2. Specify the country and behaviors:
    • Click on the "Add new tax rule" button.
    • A new form appears. Fill in the fields:
      • Country. The target country for the rule you are creating.
        • State. Some countries have federal states registered in PrestaShop (see the "States" page, under the "Localization" menu). In that case, you can make the tax even more specific, or choose to have it applied to the whole country. You can select more than one state by pressing the Ctrl key when clicking on state names.
      • Zip Code range. Whether the country has registered states or not, you can further specify the tax application using the customer's zip code. This field enables you to define zip codes in which the tax should be applied: either enter a single zip code, or define a range using the dash. For instance, use "75000-75012" to create a range for all zip codes between these two.
      • Behavior. Some customers might have an address that matches more than one of your tax rules. In that case, you can choose how this tax rule should behave:
        • This Tax Only. Will apply only this tax, not any of the other matching taxes.
        • Combine. Combine taxes. For instance: 100€ + (10% + 5% => 15%) => 115€.
        • One After Another. Apply taxes one after another. For instance: 100€ + 10% => 110€ + 5% => 115.5€.
      • Tax. The tax to be used for this tax rule. That tax must already be registered in PrestaShop. If not: choose "Not tax", disable the tax rule, save it, go create a tax in the "Taxes" page, then come back to edit the tax rule.
      • Description. You may add a short text as a reminder of why this tax rule exists for this country.
    • Click "Save and stay". The country is added to the table below, and you can start adding another country using the new-empty fields.

Note that the default rate applied to your products will be based on your store's default country.

Translations

PrestaShop provides you with full translation tool for your shop. This helps you add and edit your pages translations. This way, you are the master of your shop, and can handle your translated strings without having to wait for official translators to publish their corrections.

Even if you do not want to correct the translators' work, you might want to change the wording they chose to use (less formal, less wordy, etc.), and customize the various available text, thus tailoring your website to your audience; for instance, a hip-hop clothing shop might be better off using different expressions from that of a luxury watches shop.

The process of adapting a program to foreign languages is called internationalization and localization, or i18n and L10n for short.
Internationalization is the first step, where developers choose a mechanism for the translation of the software. All the strings of the software are then converted to make use of this mechanism.
Localization is the second step, where bi- or multi-lingual users of the software actually translate the original strings into their own language. Localization may also include providing local data in order to further improve the software for local users.
You can learn more about i18n and L10n at this Wikipedia page: http://en.wikipedia.org/wiki/Internationalization_and_localization

The PrestaShop team has chosen to use its own built-in translation tool, so that anyone with a PrestaShop installation may customize their shop to their needs.
The community translation is done with an online and open installation of PrestaShop, located at http://translate.prestashop.com/.

The official translation packs can be downloaded manually from this address: http://www.prestashop.com/en/translations.

Modifying A Translation

The most important tool of the "Translation" page is in the "Modify translations" section. This is where you can choose to edit a translation, and completely customize each and every sentence if you wish so.

Select the part of the current translation that you wish to edit:

  • Front Office translations. The text visible to your customers when browsing your store.
  • Back Office translations. The text to you and your team from your store's administration panel.
  • Error message translations. The error messages that may appear on the front-office.
  • Fields Names translations. The name of the fields in both the front-office and back-office.
  • Module translations. The terms used by the installed modules. Note that modules which are available but not installed will not appear in the tool.
  • PDF translations. The terms used in the generated PDF files: invoices, delivery slips, etc.
  • E-mail template translations. The terms used in the default e-mail templates.

Some categories have a second drop-down list, which lists the available themes. PrestaShop themes have their own strings, but can also have their own modules, PDF templates and e-mail templates. The drop-down list therefore enables you to choose which theme you want to work with.

Once your selection is done, click the flag of the language in which you wish to edit that category of translation.

A long page then appears. It contains the hundreds of available strings for that category, sometimes split in tens of fieldsets.

By default, only the fieldsets which have untranslated strings are open. If you wish to open them all, click on the button on the top left twice: once to close all of them, once more to expand them all. You can open and close fieldsets one by one by clicking on its title.

Editing a translation is easy:

  • Open a fieldset,
  • Edit its content,
  • Click on either the "Update Translations and stay" button to save while and keep translating more for this category, or on the "Update translation" button to save and return to the main "Translations" page.

PrestaShop 1.5 introduces a new syntax where strings can contain placeholders, such as %s, %d, %1$s, %2$d, etc.

When you find a string with such placeholder, it means that PrestaShop will replace it with an actual dynamic value before displaying the translated string.
For instance, in the string "Your order on %s is complete", %s will be replaced by the shop's name. Therefore you should keep it in your final translation; for instance, in French, the translation would be "Votre commande sur %s a bien été enregistrée."

Technically, having placeholders prevents strings from being split in parts. Thereby, in previous version of PrestaShop, "Your order on %s is complete." would have been split in two: "Your order on" and "is complete.". While the literal translation of these worked for some language, it made translation nearly impossible for many other languages, none the less RTL languages such as Arabic or Hebrew. Thanks to the placeholders added in PrestaShop 1.5, such strings are now fully translatable in any language.

Some strings might have a warning icon to their right. This indicates strings with placeholders. You can click on the icon to get more information.
In case of a string with a placeholder, you should make sure that the content of that placeholder will be placed in the correct flow of the sentence, and avoid literal translation.
Numbered placeholders (%1$s, %2$d, etc.) enable translators to rearrange the order of the placeholders in the string while maintaining the information each is replaced with. This way, a French translator could choose to translate "Order #%1$d from %2$s" into "Commande n°%1$s du %2$s" or "Le %2$s, commande n°%1$s".

Specific features

Most translation categories present their strings in the same way: the category's strings are grouped into fieldsets that you can close or expand by clicking on their title. The title indicates the number of expressions that the fieldset contains, and when needed, the number of missing expressions, in brackets and in red.

This is true for most categories, except three:

  • Error messages. Strings are not group into many fieldset, they are all presented together.
  • PDF templates. There is only one fieldset, "PDF".
  • E-mail templates. Strings are split into fieldsets, but they are not simple text fields anymore. Each e-mail has two templates: a HTML one, which is styled and colored, and a text one, when is plain and simple. While the plain text one can be edited directly in the textfield, the HTML one can only be edited by clicking on the "Edit this e-mail template" button at the bottom of the preview. That click turns the preview into a WYSIWYG textfield (what you see is what you get), with a complete editor at the top (based on TinyMCE: http://www.tinymce.com/). In addition to editing the text, you can change the design as you see fit, for instance you can change the colors in order to adhere to your shop's design.
    Note that the e-mail templates feature placeholders, such as {lastname} or {shop_name}, which PrestaShop replaces with the actual values when sending the e-mail. Make sure to keep them in both your translation.

Add / Update A Language

PrestaShop translations are available in packs, which combine all the different translation categories into a zip file. Many language packs are available freely for you to download and install, directly from the PrestaShop.com servers. PrestaShop will take care of downloading the language pack, unpacking it and creating the correct sub-folder in your installation's /translation folder.

You can also update the currently installed languages, likewise directly from the PrestaShop.com servers, but be reminded that any change that you might have made to your own translations will be lost once you update it.

Import A Language Pack Manually

In the case where you do not want to use an official PrestaShop translation pack, but rather a custom one (either provided by someone you know, or one that you exported from another PrestaShop installation), then this tool is for you.

Select the Zip file, select the theme to which you want that pack to be applied to, then click the "Import" button, and it will install the pack in the /translation folder.

If there is already a language folder with the same ISO 639-1 code, it will be replaced by the files from the pack you are importing.

Export A Language

You can create your own language pack using this tool, either as a way of making a backup of your customizations, or in order to share your translations with other PrestaShop installation – your own or someone else's.

Simple choose the language and the theme of the translation you wish to export, and click the "Export button.

Note that the pack will contain the theme that your translation is supposed to support.

Copy

You can copy the content of one language to another. This is especially useful when you wish to replace a theme's language with the same language from another theme.

Choose the source language and theme, then the destination language and theme, then click the "Copy" button. In most case, the language should remain the same in both drop-down lists.

If there is already a language folder for this language in the destination theme, it will be replaced by the files from the language and theme you are copying.

You might prefer to first create a new language for the destination theme before copying the source language to it.

  • No labels