Skip to content

Instantly share code, notes, and snippets.

@bertbalcaen
Created July 14, 2014 18:53
Show Gist options
  • Save bertbalcaen/dd3fd5b51e15bd6b2128 to your computer and use it in GitHub Desktop.
Save bertbalcaen/dd3fd5b51e15bd6b2128 to your computer and use it in GitHub Desktop.
Wrap string in Drupal translate tags
<!--
Where to put this file?
In menu: Sublime Text 2 > Preferences > Browse Packages
Save file as drupal-translate.sublime-snippet, and place in Packages > User.
Key binding:
In menu: Sublime Text 2 > Preferences > Key Bindings - User
Add inside the array:
{ "keys": ["ctrl+t"], "command": "insert_snippet", "args": { "name": "Packages/User/drupal-translate.sublime-snippet" }}
-->
<snippet>
<content><![CDATA[<?php print t('$SELECTION'); ?>]]></content>
<description>Drupal: translate selection</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment