On this page
- On this page
- General
- How to Publish
- Updating from the Old to the New Publishing Method
- Important Changes
General
Langify can now be published directly within the Embedded Apps section of your Shopify Theme Customizer.
Please be aware that the previous publishing method via the langify dashboard is not available anymore.
The advantage of this new publishing approach is that langify will no longer make any modifications to your theme's code. Consequently, uninstalling langify will not result in any residual code issues.
How to Publish
A button "Open Customize Theme Editor" is available in the Theme Settings of the langify dashboard, which will direct you to the Embedded App section.
Alternatively, you may access the Theme Customizer in Shopify and navigate to the Embedded App section, where you will find an option to "Enable langify."
Upon publishing langify via your Theme Customizer, it is imperative to input the theme ID into the appropriate field.
The theme ID can be copied from the Theme Settings in langify, or located within the URL of your Theme Customizer page.
Note, that each theme has its own, unique ID.
Updating from the Old to the New Publishing Method
If you already have langify published on your theme, you can migrate to the new method with a few clicks.
Alternatively, you can keep the published state as it is and leave langify disabled in the Embedded App section of your theme - your translations will continue to function normally. However, please note, that since the 1st of February 2024, langify is no longer able to clean up its translation code by itself and the process has to be done manually.
To update your publishing method to the new standard, you can visit the 'Theme Settings' tab on the Langify dashboard. There, you'll find the option to "Start to Remove the Code":
- Click on this option and then on "Generate code" - langify will proceed to generate the code of your theme's main file as it were without the old langify translation code.
- Copy the code to your clipboard as prompted and click on "open template".
- Replace the existing code in 'theme.liquid' file by selecting all (Ctrl+A) and pasting the new code (Ctrl+V).
This will insert the original code of the file with just a few additional lines of code for langify.
Optionally, also remove the 4 langify files from your theme. Their names are:
ly-core-scripts.liquid
ly-liquid-scripts.liquid
ly-get-customs.liquid
ly-switcher-factory.liquid
Should you require assistance with this process, please do not hesitate to contact us at support@langify-app.com
Afterwards, enable langify in the Embedded App section of your theme as mentioned above.
Don't forget to add your theme ID in the settings of the langify Embedded App section! This is important in order for the language switcher settings to be applied to your theme.
Note, that cleaning up langify's old translation code from your theme only affects the language switcher and translations of the sections Custom and Static.
Once langify is active as embedded app on your theme, the language switcher and Custom Content translations should be back in place.
For the Static section translations, please follow our guide Manually Managing langify's Translation Code and when you edit and save any new translations in the Static section, remember to manually update the translation code for that snippet specifically, as outlined in out guide Manually Managing the Static Section Code
Important Changes
Please be aware that the new publishing process introduces significant changes to three of langify's functionalities.
- The settings within the langify dashboard related to the language switcher and Theme settings are now globally applied to all themes unless a specific theme ID is provided in the Embedded App section of the theme.
- The Custom section now utilizes only client-side JavaScript to translate the content on your pages. This may result in a slight delay before translations are visible. To minimize this latency and utilize langify's original server-side translation method, please consult our guide on how to manually integrate langify into your theme.
- The Static section relies entirely on translation code inside the theme and unfortunately will no longer work out of the box with the new publishing method. You can however quickly get all your Static section translations back by adding the translation code mentioned in our guide Manually Managing langify's Translation Code.
If you edit your snippet or edit the Pagefly/Gempage, please follow our guide to publish the updated Static translation code manually to the theme in order to apply the translation.
If you prefer not to manage any manual translation code, please use the Custom section instead to add your translations. This has the added benefit that you do not need to migrate the Static section translations upon a theme change.