Answers.Body: <p>The <a href="https://github.com/boboldehampsink/translate" rel="nofollow">Translate plugin</a> does what you need, it scans templates and plugins, and also provides an interface for translation.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-21T14:39:04.243Z
Answers.Text: unfortunately the translate plugin isn't maintained anymore.
Answers.UserDisplayName: Peter Piper
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-04T09:56:28.163Z
Answers.LastActivityDate: 2015-08-04T09:56:28.163Z
Answers.UserDisplayName: drifteaur
Answers.Body: <p><strong>Update:</strong></p>
  
  <p>For Craft 3, we use the Yii 2 Inspections plugin for PhpStorm to do this now. <a href="https://plugins.jetbrains.com/plugin/9400-yii2-inspections" rel="nofollow noreferrer">https://plugins.jetbrains.com/plugin/9400-yii2-inspections</a></p>
  
  <p>There is a translation inspection that will let you know which strings are missing translations and which translations are no longer in use.</p>
  
  <hr>
  
  <p><strong>Old:</strong></p>
  
  <p>We currently have our own command line tool that goes through all of Craft's files and extracts anything in <code>Craft::t()</code> (for PHP), and <code>|t</code> (for Twig) and <code>Craft.t()</code> for JavaScript.</p>
  
  <p>What we would probably do is make that tool into a <code>yiic</code> command and update it to let plugins take advantage of it for their own files as well.</p>
  
  <p>Will add it to the list.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-21T14:27:22.227Z
Answers.Text: is there a chance that you are going to share that cli with the rest of the world?
Answers.UserDisplayName: Peter Piper
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-22T00:20:27.480Z
Answers.Text: Updated answer @PeterPiper
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2014-07-11T22:33:19.377Z
Answers.LastActivityDate: 2018-12-22T00:20:18.100Z
Answers.LastEditDate: 2018-12-22T00:20:18.100Z
Answers.UserDisplayName: Brad Bell
Body: <p>I use Craft on multilingual site and I'm having some difficulty in getting the static messages on templates added or changed on every translation file I have.</p>
  
  <p>Is there any way to extract those static messages changed or not already translated from templates into all translation files?</p>
  
  <p>I'm looking for a functionality like of "yiic message" which searches for messages to be translated in the specified source files and compiles them into PHP arrays as message source.</p>
  
Tags: <templating><localization>
Title: How to extract static messages from templates into translation files?
ThreadText: # How to extract static messages from templates into translation files?
  
  (Asked by: username_0 on 2014-07-11)
  
  I use Craft on multilingual site and I'm having some difficulty in getting the static messages on templates added or changed on every translation file I have.
  
  Is there any way to extract those static messages changed or not already translated from templates into all translation files?
  
  I'm looking for a functionality like of "yiic message" which searches for messages to be translated in the specified source files and compiles them into PHP arrays as message source.
  
  **Tags:** templating, localization
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2014-07-11. Score: 6 | Accepted answer
  
  **Update:**
  
  For Craft 3, we use the Yii 2 Inspections plugin for PhpStorm to do this now. <https://plugins.jetbrains.com/plugin/9400-yii2-inspections>
  
  There is a translation inspection that will let you know which strings are missing translations and which translations are no longer in use.
  
  ---
  
  **Old:**
  
  We currently have our own command line tool that goes through all of Craft's files and extracts anything in `Craft::t()` (for PHP), and `|t` (for Twig) and `Craft.t()` for JavaScript.
  
  What we would probably do is make that tool into a `yiic` command and update it to let plugins take advantage of it for their own files as well.
  
  Will add it to the list.
  
  > **Comments:**
  > **username_2**: is there a chance that you are going to share that cli with the rest of the world?  
  > **username_3**: Updated answer @username_2  
  
  ---
  
  ### Answer by username_1 on 2015-08-04. Score: 3
  
  The [Translate plugin](https://github.com/boboldehampsink/translate) does what you need, it scans templates and plugins, and also provides an interface for translation.
  
  > **Comments:**
  > **username_2**: unfortunately the translate plugin isn't maintained anymore.  
  
  ---
  
  