1. How do I debug Smartling Drupal Connector for Drupal 7?
The D7 connector can be split into 4 major subsystems:
- Extraction of source content and application of translations
- Queuing
- Network
- Module/site configuration
- To Test Network: Go to the modules main setting page and press “Test connection” button. You should get a list of green locales and the top of the page. If you don’t get it - either locales are not configured properly or there is a network issue. Right now we do not support proxies or any other workarounds for firewall issues. So the network should work straightforward for the connector to function well. We use CURL as a low-level library and support for https should be enabled for it.
- Queues: Because of some limitations of PHP we run queues by cron. And by default 95% of the processing happens during cron run. As a result if cron is triggered rarely, it might take a while for the content to arrive to Smartling or be downloaded back.
The easiest way to check if we are facing some issue with queues is to disable them on Advanced settings of Smartling module. In order to do that, please, uncheck “Asynchronous mode” checkbox on that page. After this you should be able to trigger upload/download operation immediately from any UI option you prefer.
For test purpose I usually enable “Pseudo” translation mode on the settings tab. Then upload a new piece of content and download back right after that. After that you need to check if translation was applied. If it was, then it is worthwhile to look deeper into the queues and if it didn’t then there might be an issue with some other subsystem. - Module Settings: On the Drupal status page there should be a green background for the line about Smartling filesystem. It means that module is allowed to write files with source/translations on disk.
Languages need to be set correctly according to the Smartling dashboard.
Check if there is no message at the bottom of Smartling config page stating that “The following field(s) should be disabled for translation: ...”. If there is one, it means that one of the fields is translated both “by nodes” and “by fields” which is prohibited.
When translating field_collections, make sure that the node containing it is translated with “by nodes” method and that fields inside field collection are checked for translation on the Entities tab. - Subsystem that extracts source content and applies translations back: Everything is pretty complicated here. So if you didn’t find any issues in the subsystems above - the issue should be passed to a developer.
- Logs: It is always a good thing to take a look at logs and see if you see anything strange there. Usually it is a good practice to filter messages by “Smartling” and “PHP” type. In many cases these messages will contain a tip for an answer.
And we (developers) highly appreciate when the customers issue that is passed to us contains text from logs that might be related to the issue (with “Smartling” or “PHP” type). Our recommendation for the info needed to understand what’s going on on the site:- Logs
- Screenshot of site config
- Steps to reproduce the issue (if available)
- Result of checks of the subsystems mentioned above
2. What source languages do we support?
Drupal 7 connector can support any source language as long as it is the site’s default language. The source language configured in your Drupal instance must be configured to the same in your Drupal Connector project in Smartling. Multiple source languages within a single site is not supported.
It is possible to configure multiple source languages with a multisite approach, essentially a way of making separate sites. This would require a Drupal Connector project for each source languages as there can only be one source language per Smartling project.
3. How can I ensure that context works properly?
Enable smartling_translation_context
module at /admin/modules
page if it's disabled.
- Go to the Smartling settings page at
/admin/config/regional/smartling
to the Context Settings tab. - Set up the user name. It's usually the name of a user that has at least the permissions for viewing pages on a site.
- Open Debug fields fieldset and put the url of a node into the Page URL field (for example: http://*your.site*/en/node/1). Check "Preview" option and click Save.
After these steps, you will see a generated context. If not, and if it's just a blank page or page with “Unauthorized” text, it may be due to a Basic auth set up on your web server. Set up basic auth credentials on the Smartling settings page.
4. Can I disable context for some content/entity types?
Yes. You can exclude needed entities from being contextualized at the /admin/config/regional/smartling
page via the Context Settings tab.
5. Is it possible to translate URL's coming from Drupal in the Smartling CAT tool?
Yes, href
URLs coming from Drupal content fields can be translated. This can be set up at `/admin/config/regional/smartling` page under "Advanced settings" tab.