您可以查看和更新模板中的任何語(yǔ)言,無(wú)論是您自己創(chuàng)建的翻譯還是下載時(shí)附帶的翻譯。
您可以查看和更新模板中的任何語(yǔ)言,無(wú)論是您自己創(chuàng)建的翻譯還是下載時(shí)附帶的翻譯。
在創(chuàng)建或更新翻譯時(shí),您需要將已翻譯的內(nèi)容添加到文本塊:
查找要翻譯的內(nèi)容
內(nèi)容類型
您可以使用語(yǔ)言編輯器來(lái)查找模板中您想翻譯的文本內(nèi)容。
您可能希望翻譯三種基本類型的內(nèi)容:
純文本
HTML
Liquid
您可以通過(guò)在文本字段中輸入翻譯來(lái)翻譯每段文本。
您不必翻譯模板中的每個(gè)字段。您的更改會(huì)自動(dòng)保存,并且您可以隨時(shí)停止。如果要進(jìn)行更改,您可以訪問(wèn)任何現(xiàn)有翻譯。
如果某一字段沒(méi)有翻譯,則將使用該模板的默認(rèn)語(yǔ)言。
您可以直接翻譯純文本,但在翻譯包含 HTML 或 Liquid 的文本塊時(shí),您需要格外的謹(jǐn)慎。
對(duì)于您在線商店中的大多數(shù)文本,您無(wú)需使用 HTML 或 Liquid。當(dāng)您輸入純文本塊的翻譯時(shí),您只需將文本替換為使用其他語(yǔ)言的等效文本即可。
如果文本塊包含 HTML,那么您會(huì)看到成對(duì)的尖角括號(hào) ( <
>
) 圍繞單詞或短語(yǔ)。
必須了解在要翻譯的塊中使用 HTML 的方式。雖然您需要將大部分內(nèi)容都保留為英語(yǔ)原文,但您可能需要翻譯 HTML 內(nèi)的一些英語(yǔ)單詞。
通常使用包含 HTML 的文本塊,原因如下:
創(chuàng)建指向在線商店其他部分或指向其他網(wǎng)站的鏈接
為文本添加格式。
HTML 鏈接包含在以 <a href=
開(kāi)頭,以 </a>
結(jié)尾的標(biāo)簽中。
您只能翻譯鏈接的名稱,而不能翻譯其他組件。鏈接名稱是客戶將看到的唯一鏈接部分。
Continue browsing <a href="/collections/all">here</a>.
在此示例中,您將使用合適的翻譯替換單詞 Continue(繼續(xù))、browsing(瀏覽)和 here(此處)。
切勿翻譯鏈接中的目標(biāo)地址(也稱為目標(biāo))。目標(biāo)地址是客戶點(diǎn)擊鏈接時(shí)將轉(zhuǎn)到的位置。它始終顯示在引號(hào)中并指向特定網(wǎng)址。在示例鏈接中,目標(biāo)地址為 /collections/all
。
HTML 有時(shí)用于強(qiáng)調(diào)單詞或短語(yǔ)、為其提供其他樣式,或者用于顯示符號(hào)。您只能翻譯使用 HTML 設(shè)置樣式的單詞,而不能翻譯代碼或標(biāo)簽本身。請(qǐng)查看示例,確保您了解要翻譯的內(nèi)容以及應(yīng)保留不變的內(nèi)容。
在以下示例中,<strong>
標(biāo)簽用于以粗體顯示文本:
<strong>On Sale</strong>
在這種情況下,只需翻譯單詞 "On Sale"。
在以下示例中,HTML 代碼 ←
和 →
用于生成左右箭頭符號(hào):
← Previous Product
Next Product →
在這里,您只需翻譯詞組 Previous Product(上一個(gè)產(chǎn)品)和 Next Product(下一個(gè))。
在以下示例中,HTML <strong>
標(biāo)簽用于加粗顯示文件名 collection-sidebar.liquid。
Add a type to your products for this list to build itself. All lists are created in <strong>collection-sidebar.liquid</strong>
此處的文件名是一個(gè) Liquid 模板文件。只有在需要匹配文件名本身時(shí)才應(yīng)翻譯文件名。例如,如果您已創(chuàng)建自己的文件,則可能需要更改 HTML 中的文件名。
切勿翻譯 HTML 標(biāo)簽或符號(hào)代碼。它們由瀏覽器使用,客戶無(wú)法看到。
切勿翻譯 Liquid 標(biāo)簽、對(duì)象或篩選器。
Liquid 是一種模板語(yǔ)言,可控制網(wǎng)站在不同環(huán)境中的外觀。Liquid 內(nèi)容始終包含在以下某組符號(hào)之中:
{{
and }}
{%
and %}
{%-
and -%}
例如:
Posted on {{ date }}
在此示例中,您只需翻譯 Liquid 周圍的文本,而無(wú)需翻譯 {{ date }}
。
以下是使用純文本、HTML 和 Liquid 的組合的文本字段示例:
<strong>{{ author }}</strong> on {{ date }}
雖然此示例可能看起來(lái)很復(fù)雜,但您需要翻譯的唯一部分只是單詞 on。
Using the language editor to add translated content
You can review and update any language in your theme, whether you created the translation yourself or it came with the download.
You'll need to add translated content to text blocks when you're creating or updating translations:
Find the content that you want to translate
Types of content
Find the content that you want to translate
You can use the language editor to find the text content in your theme that you want to translate.
Types of content
There are three basic types of content that you might want to translate:
Plain text
HTML
Liquid
You can translate each pie 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.It's important 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 inside of the HTML tags that you'll want to translate.
Text blocks that contain HTML are typically used for the following reasons:
creating links to another part of your online store or to a different website
adding formatting to text.
Translate HTML link names
An HTML link is surrounded in tags that start with
<a href=
and end with</a>
.You must translate only the name of the link, and not its other components. The link name is the only part of the link that your customers will see.
Continue browsing <a href="/collections/all">here</a>.In this example, you'd replace the words Continue, browsing, and here, with a suitable translation.
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 the examples to make sure that you understand what to translate and what you should leave unchanged.
HTML styling examples
In the following example, the
<strong>
tags are used to display text in bold:<strong>On Sale</strong>In this case, you'd translate only the words On Sale.
In the following example, HTML codes
←
and→
are used to generate left and right arrow symbols:← Previous ProductNext Product →Here, you'd translate only the phrases Previous Product and Next Product.
In the following example, HTML
<strong>
tags are used to display the file name collection-sidebar.liquid in bold.Add a type to your products for this list to build itself. All lists are created in <strong>collection-sidebar.liquid</strong>The file name here is a Liquid 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 are not seen by your customers.
Text blocks that contain Liquid
Never translate Liquid tags, objects, or filters.
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:
<strong>{{ author }}</strong> on {{ date }}Although this example might look complex, the only part that you'd need to translate is the word on.
特別聲明:以上文章內(nèi)容僅代表作者本人觀點(diǎn),不代表ESG跨境電商觀點(diǎn)或立場(chǎng)。如有關(guān)于作品內(nèi)容、版權(quán)或其它問(wèn)題請(qǐng)于作品發(fā)表后的30日內(nèi)與ESG跨境電商聯(lián)系。
二維碼加載中...
使用微信掃一掃登錄
使用賬號(hào)密碼登錄
平臺(tái)顧問(wèn)
微信掃一掃
馬上聯(lián)系在線顧問(wèn)
小程序
ESG跨境小程序
手機(jī)入駐更便捷
返回頂部