You can translate each piece of text by entering translations into the text fields.
You don't have to translate every field in your theme. Your changes are saved automatically and you can stop at any time. You can access any existing translation if you want to make changes.
If you leave a field without a translation, then the default language for the theme is used.
You can translate plain text directly, but you'll need to take extra care when translating text blocks containing HTML or Liquid.
Translate plain text
For most of the text on your online store, you don't need to use HTML or Liquid. When you enter a translation of a plain text block, all you have to do is replace the text with its equivalent in the other language.
Text blocks that contain HTML
If a text block contains HTML, then you'll see pairs of angled brackets (<>) surrounding words or phrases.
You need to understand how the HTML is being used in the block that you're translating. Although you'll need to leave most of the content in the original English, there might be some English words outside of the angled brackets that you'll want to translate.
Text blocks that contain HTML are typically used for the following reasons:
In this example, you'd replace the wordsContinue,browsing, andhere,一个合适的翻译。
Never translate the destination address (also known as the target) in a link. The destination address is where a customer goes when they click the link. It's always shown in quotation marks and points to a specific web address. In the example link, the destination address is/collections/all.
Translate text styled with HTML
HTML is sometimes used to give emphasis or additional styling to words or phrases, or to display symbols. You must translate only the words that are being styled by the HTML, and not the codes or tags themselves. Take a look at theexamplesto make sure that you understand what to translate and what you should leave unchanged.
HTML styling examples
In the following example, thetags are used to display text in bold:
On Sale
In this case, you'd translate only the wordsOn Sale.
In the following example, HTML codes←and→are used to generate left and right arrow symbols:
←Previous Product
Next Product→
Here, you'd translate only the phrasesPrevious ProductandNext Product.
In the following example, HTMLtags are used to display the file namecollection-sidebar.liquidin bold.
Add a type to your products for this list to build itself. All lists are created incollection-sidebar.liquid
The file name here is aLiquid template file. You should translate the file name only if it's necessary to match the name of the file itself. For example, if you have created your own files, then you might need to change the file name in the HTML.
Never translate HTML tags or symbol codes. These are used by your browser, and aren't seen by your customers.
Liquid is the templating language that controls the appearance of your website in different contexts. Liquid content is always wrapped in one of the following sets of symbols:
{{and}}
{%and%}
{%-and-%}
For example:
Posted on{{date}}
In this example, you would translate only the text around the Liquid, and not{{ date }}.
Here's an example of a text field that uses a combination of plain text, HTML, and Liquid:
{{ author }}on {{ date }}
Although this example might look complex, the only part that you'd need to translate is the wordon.