What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: Text added manually to the theme's code, how to translate?

Solved

Text added manually to the theme's code, how to translate?

Dmitrii_Dzh
Tourist
9 1 2

Hello,

 

Shopify themes are great, but sometimes we need some additional adjustments.

We have added manually text in several places of our theme, but this text is not visible to the Shopify translator, since it wasn't written in one of the theme's fields.

Could you advise what kind of code should be added in order to make manually added text visible for translation applications?

 

Best Regards, 

Dmitrii

Accepted Solution (1)
Dmitrii_Dzh
Tourist
9 1 2

This is an accepted solution.

Hello,

 

1. I have checked the linked provided by @Localize_Alex 

https://www.shopify.com/partners/blog/translation-keys

 

2. Have updated my footer.liquid:

<!-- Manually added code START -->
<p>
<br>
<font size="2">
{{ 'layout.newsletter_agreement' | t }}
<u><a href="https://puulab.com/pages/privacy-notice">{{ 'layout.privacy_policy' | t }}</a></u>.
</font>
</p>
<!-- Manually added code END -->

 

3. Updated en.default.json

Dmitrii_Dzh_4-1685192005212.png

 

 

4. Translate and Adapt now able to see this text:

Dmitrii_Dzh_5-1685192045586.png

 

Thanks both you for the help!

 

Best Regards,

Dmitrii

 

View solution in original post

Replies 4 (4)

Ujjaval
Shopify Partner
1242 197 213

@Dmitrii_Dzh Ask to app support theme they will provide best solution for that.

Localize_Alex
Shopify Staff (Retired)
6 1 4

Hi @Dmitrii_Dzh! I’m Alex, a designer on the Translate & Adapt team. Could you DM me an example of a piece of text you modified that’s not showing up in the app? I’d love to help.

To learn more visit the Shopify Help Center or the Community Blog.

Transcy
Shopify Partner
285 19 87

Hello @Dmitrii_Dzh ,

 

You can use the {{ 'text here' | translate }} filter to mark the text for translation.

Example:

{{ 'Welcome to our store!' | translate }}

To ensure that the translation app recognizes the manually added text, make sure to include it in a template file that the app can scan. For example, you can add the translated text in a Liquid template file or a language file.

 

Hope this will work.

Transcy team. 

Transcy - The #1 Translation and Currency Converter
- Was my answer helpful? Please hit Like or Mark it as solution!
- Get in touch with us: App Store | Blog
Dmitrii_Dzh
Tourist
9 1 2

This is an accepted solution.

Hello,

 

1. I have checked the linked provided by @Localize_Alex 

https://www.shopify.com/partners/blog/translation-keys

 

2. Have updated my footer.liquid:

<!-- Manually added code START -->
<p>
<br>
<font size="2">
{{ 'layout.newsletter_agreement' | t }}
<u><a href="https://puulab.com/pages/privacy-notice">{{ 'layout.privacy_policy' | t }}</a></u>.
</font>
</p>
<!-- Manually added code END -->

 

3. Updated en.default.json

Dmitrii_Dzh_4-1685192005212.png

 

 

4. Translate and Adapt now able to see this text:

Dmitrii_Dzh_5-1685192045586.png

 

Thanks both you for the help!

 

Best Regards,

Dmitrii