![]() ![]() Magento translates words and phrases when all of the following conditions are met: However, inline translations are theme-specific and do not apply if another theme is assigned. In the storefront, an inline translation of a phrase overwrites the translation stated in a dictionary. Changes made in the Text Editor are not recorded in an instance’s dictionary instead, they are stored in the database. Otherwise, Magento returns an error.Īnyone can submit translations on the storefront using the Text Editor. Only one variant of translation can be used for a word or phrase in a package. If desired, package your translations in a language package. Generate a dictionary of your instance using the translation dictionary tool. Translating the names, titles and phrases used in Magento involves the following steps: If you want your theme to be ready for localization. If you want to replace certain strings from the parent theme.įor example, use “Compare” instead of “Add to Compare”. You might need to add a dictionary for the default language (en_US) in the following cases: Why you might need to add a dictionary for a theme If you need to specify a variable in these cases, ensure that it is translated correctly wherever it is defined as a string literal. Instead, you should place the full text in the _() function or new Phrase() call. ![]() The scanner that collects the phrases from the code cannot interpret and collect the value of the variable when it is in these locations. It is recommended, but not enforced, that you do not place variables inside _() functions or new Phrase() calls. ![]() The language package (i18n directory) can now be moved and saved to any directory of your extension.The phrases for translations are enabled in the Phrase class. Parent translations are used.You can customize your translations even further by creating more than one version of a translation for the same language.ĭepending on your needs, you can use the existing language packages or translate Magento by yourself. Inheritance means (among other things) that if you missed or omitted localizing some phrases or terms, You can create localizations based on existing, or parent, You can use the ready-to-use language packages prepared by other users or you can create your own. Included in the i18n directory of a module or theme, the Magento application auto-discovers these packages.Īn entire dictionary in one directory.This is intended to be used and distributed as a standalone component (similar to modules and themes). See Translations overview in Magento DevDocs For more information, see Generate a translation dictionary. csv file requires additional columns that specify the themes or modules in which the translations were found. You can also distribute language packages to other merchants if you wish. "Additional Product Info"," معلو مات اضافية عن المنتج"Ī language package is basically a collection of translation dictionaries for a particular language together with meta-information. Sample translation from English (en_US) to Arabic_Egypt (ar_EG): We improved the localization and customization of Magneto instances by making translation dictionaries easier to update and by maintaining a reduced amount of code coupling and duplication.Ī translation dictionary is a comma-separated value (.csv) file with at least two columns: the original phrase in the en_US locale and a translation of that phrase in an another locale. The Magneto application enables you to localize your store for multiple regions and markets.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |