Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Add a new custom language

Can I add a new custom language to my store's available languages?

tkclo
Tourist
10 0 0

I would like to add a new custom language with a custom shortcode. This language is not listed in the available store languages and I would like to add an option for it there. Is this possible?

Replies 4 (4)

Transcy
Shopify Partner
285 19 87

Hello @tkclo ,

 

Yes, ti can but it needs a little bit coding skills. You can try to:

1. Create a new language file: Go to Languages -> add languages 

2. Add the custom shortcode by add the following code in your new language file:

"shortcode_name": "Shortcode Value"

 3. Use the custom shortcode in your theme: Once you have added the custom shortcode to the language file, you can use it in your theme by wrapping it in the {{ 'shortcode_name' | t }} tag. For example, if you added a shortcode named "welcome_message", you can display it in your theme by adding the following code:

{{ 'welcome_message' | t }}

 

4. Translate the custom shortcode: Finally, you can use a translation app or the Shopify Translation API to translate the custom shortcode into other languages. The translation app will recognize the custom shortcode and include it in the list of translatable content.

 

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
tkclo
Tourist
10 0 0

Where can I find the language file?

Dan_Nistor
Shopify Partner
42 1 8

Yes, it is possible to add a new custom language to your Shopify store and create a custom shortcode for it. However, this process requires some technical knowledge and involves modifying your store's code.

 

Here are the general steps to add a custom language with a custom shortcode to your Shopify store:

 

Edit your store's language files: In your Shopify admin, go to Online Store > Themes > Actions > Edit languages. Scroll down to the bottom of the page and click on "Add another language". Enter the name of your custom language and click "Save". You can then edit the language file for your custom language and add your custom shortcode translations.

 

Modify your theme's code: Depending on how you want to use the custom shortcode, you may need to modify your theme's code. For example, if you want to add the shortcode to a product description, you would need to modify the product template. If you want to add the shortcode to the checkout page, you would need to modify the checkout template.

 

Test and refine: Once you have added your custom language and shortcode, test it thoroughly to ensure that it works as expected. Make any necessary adjustments to your code and translations to ensure that everything is working correctly.

 

It's important to note that modifying your store's code can be risky and may cause unexpected issues if not done correctly. Therefore, it's always recommended to backup your theme files and consult with a Shopify expert or developer if you're not familiar with the process.

Dan from Vevol Media - Shopify Partners Since 2018
--
• Was my reply helpful? Click Like to let me know!
• Was your question answered? Mark it as an Accepted Solution

tkclo
Tourist
10 0 0

I do not have the Actions > Edit languages option. I believe this is because I have Shopify 2.0. Is this possible in the latest version of Shopify?

 

This is what I see when I go to Online Store > Themes

tkclo_0-1680288375118.png