Home › Forums › Legacy Support › Support queries › Translation issues › Translation Guide/Common Issues Fixes By VibeThemes Support!
Tagged: translation not working
- This topic has 3 replies, 4 voices, and was last updated 6 years, 7 months ago by Mark Morgan.
-
AuthorPosts
-
November 15, 2016 at 6:19 am #79787Skywalker [ ex VibeThemes]Participant
TRANSLATION GUIDES
*INDEX*
- Download 100% Translated files of Buddypress, Woocommerce and buddydrive.
- Start Editing our provided translation files with the theme and it's plugins the correct way.
- Creating your own Translation files.
- Backup translations for safely updating plugins and theme.
- Synchronising your POT, PO and MO files after Update to add the new strings that are added to the source code into the translation files.
- Important notes and fixes.
WE RECOMMEND OUR USERS TO USE LOCO TRANSLATOR FOR TRANSLATING THE THEME AND PLUGINS : https://wordpress.org/plugins/loco-translate/
*********************************************************************************************
1. Download and setup 100% Translated files of Buddypress, Woocommerce and buddydrive.
https://vibethemes.com/documentation/wplms/knowledge-base/buddy-press-translation-using-loco-translator/*********************************************************************************************
2. Start Editing our provided translation files with the theme and it's plugins the correct way.
1. Go to WP Admin -> Plugins -> Add New 2. Search for plugin "Loco Translate" 3. Install and Activate the plugin. 4. After Activation locate WP Admin -> Loco Translate 5. Click on Loco Translate. 6. Choose the plugin/theme which provides the text that you want to translate. 7. Click on that plugin/theme. Some settings will appear. 8. Now click on edit template. 9. After clicking on EDIT TEMPLATE , Now a page will open. Click on sync and save to syncronise the pot file. 10. Now go back to wp-admin->loco translator->plugins->select that plugin. 11. Now click on COPY on the language that you want to edit that is provided by us with the plugin. 12. Some Settings will appear. 13. Now choose the exact language that you selected in the previous step. Choose system language and copy translations from XX. Click on start translating, it will create a copy of the translation file in the global folder. 14. Click on sync and save. 15. Now you can simply add your translation strings and then save them. All that translation that you make in this global file will retain even after updaing the theme and the plugin. 16. Now go back to that wp-admin->loco translator->plugins->select that plugin again Since you have created a global translation file, now you can delete the local translation file. DONE.NOW YOU CAN SUCCESSFULLY EDIT AND RETAIN THE TRANSLATION FILES PROVIDED BY US.
********************************************************************************************* 3. Creating your own Translation files.
WPLMS highly recommends using LOCO Translator for translation.1. Go to WP Admin -> Plugins -> Add New 2. Search for plugin "Loco Translate"3. Install and Activate the plugin. 4. After Activation locate WP Admin -> Loco Translate 5. Click on Loco Translate. 6. Choose the plugin/theme which provides the text that you want to translate. 7. Click on that plugin/theme. Some settings will appear. 8. Now click on edit template if template is already created. Otherwise you will have to create a template. OR 9. After clicking on EDIT TEMPLATE , Now a page will open. Click on sync and save to syncronise the pot file. 10. Now Select the language translation file or create a new language translation file. 11. Click on new language to add the language. Some settings will appear. 12. Choose your language and always select the system location 13. Click on start Translating. 14. Now a whole new set of settings will appear. 15. Click on the Sync button. 16. Search for the text that you want to translate. 17. select the text. 18. Write the translation text then click on save. 19. You can download the PO and MO files from here. 20. If you are translating any string with Variables like %s, %d Then You need to follow this guide. https://developer.wordpress.org/themes/functionality/internationalization/#variablesFINALLY CHECK THE FRONTEND TO SEE YOUR TRANSLATED TEXT. #CHEERS.
*********************************************************************************************
4. Backup Translations to safely update.
If you want to add your own po/mo files or your custom translation then it is strongly advised that you put set the location as GLOBAL.
PO and MO Global translation files Location
For Themes : "wp-content\languages\themes\" For plugins : "wp-content\languages\plugins\" It is advised so because after each update we replace the po/mo files located in the local folders. So if you have added any translation of your own it will get replaced. Also the priority of translation files is : 1. Global 2. Local So always choose Global for your own custom translations. That way your custom translation will be retained even after the update.GUIDE TO SAFELY BACKUP TRANSLATION FILES BEFORE UPDATING
PO and MO local translation files Location
For Themes : "wp-content\themes\wplms\languages" For plugins : "wp-content\plugins\pluginname\languages"
PO and MO Global translation files Location
For Themes : "wp-content\languages\themes" For plugins : "wp-content\languages\plugins"
- The Global translation files are not changed when you update any plugin or theme.
- Only Local Translation files are changed.
*********************************************************************************************
5. Synchronising your POT, PO and MO files after Update to add the new strings that are added to the source code into the translation files.
AFTER UPDATING PLUGIN/THEME
Some strings maybe added, removed or changed after the update.
1. Go to wp-admin2.. Click on Loco Translate.
3. Choose the plugin/theme which provides the text that you want to translate.
4. Click on that plugin/theme. Some settings will appear.
5.. Now click on edit template
6. After clicking on EDIT TEMPLATE , Now a page will open. Click on sync and save to syncronise the pot file.
7. Now go back to the wp-admin-> loco translator->the plugin or theme you want to translate.
8. Now Select the language translation file
9. Click on the Sync button.
10. Click on save.
YOUR POT FILE, PO FILE AND THE MO FILES ARE SYNCHRONISED WITH THE SOURCE CODE.
*********************************************************************************************
6. IMPORTANT NOTES AND FIXES
1. Wordpress changed the way how it manages the translation files in 4.6 Update. Prior to 4.6 version of wordpress style of naming the translation files was "xx_XX.po/mo" but now they have changed it to "text_domain-xx_XX.po/mo". So, we also had to change the way how we do it in our theme update "WPLMS 2.3"to make it compatible with wordpress 4.6 and up. Please note the Code Styling won't work for wordpress 4.6 and above. You can Download This plugin from here: https://wordpress.org/plugins/loco-translate/ 2. If you are translating any string with Variables like %s, %d, Then You need to follow this guide. https://developer.wordpress.org/themes/functionality/internationalization/#variables 3. Location Priority of translation files in our themes. I. Global Folder : Our theme loads the Translation files located in the global folder. System : wp-content/languages/plugins/'textdomain'-xx_XX.po System : wp-content/languages/themes/'textdomain'-xx_XX.po II. Local Folder : Our theme loads the Translation files located in the local foder. Author : wp-content/themes/themename/languages/'textdomain'-xx_XX.po mo Author : wp-content/plugins/pluginname/languages/'textdomain'-xx_XX.po mo 4. If translation Still Doesn't work Then try doing this : VIA FTPTheme translation file location
Move the vibe-xx_XX.po/mo located in the "../wp-content/themes/wplms/languages/" folder to "../wp-content/languages/themes" folder.Plugin translation file location
Move the 'abcd'-xx_XX.po/mo located in the "../wp-content/plugins/'pluginname'/languages/" folder to "../wp-content/languages/plugins" folder.October 4, 2017 at 4:29 pm #130965elderenriqueParticipantI followed the steps indicated in the guide, but when I try to save the translation of the template still leaving a file not found, please I need to translate the topic, and already moved the .mo and .po files as indicated at the end of this guide. Please I need helpApril 30, 2018 at 7:30 am #154699bhaskerguptaParticipantHi, I have followed the steps to sync the files. Still, Translations are not visible on the website in spite of being present in Loco-translate. Please help.April 30, 2018 at 12:56 pm #154757Mark MorganSpectatorReplied on this topic https://wplms.io/support/forums/topic/translation-not-visible/ Please do not create duplicate topics. -
AuthorPosts
- The topic ‘Translation Guide/Common Issues Fixes By VibeThemes Support!’ is closed to new replies.