title: Disable translations for a given request (laravel)
body: <p>I'm currently building a Vue.js SPA with laravel as the backend where I need to support multiple locales. I'm therefore considering using <a href="https://github.com/rmariuzzo/Lang.js" rel="nofollow noreferrer">Lang.js</a> alongside laravel's built-in translation system to manage the translated stings. I basicly want to manage all the strings in laravel (on the backend) but let the frontend handle the actual translations, to allow the user to switch language dynamicly with a language switcher ui component.</p>
  
  <p>The problem is that when I submit a form request that is validated on the server, the error messages are already translated, thus not allowing the frontend to pick a language on-the-fly.</p>
  
  <p>My question is how I can disable the translation for a given request (preferably using headers in middleware or something like that) and instead print the raw translation keys</p>
  
  <p>For example for the given validation</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  function store() {
      request()-&gt;validate(['test' =&gt; 'required'])
  }
  </code></pre>
  
  <p>The server returns </p>
  
  <pre><code>{
      'message': 'The given data was invalid',
      'errors': {
          'test': 'The test field is required'
      }
  }
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>{
      'message': 'The given data was invalid',
      'errors': {
          'test': 'validation.required',
      }
  }
  </code></pre>
  
  <p>I have already tried using <code>\App::setLocale('somethinginvalidandrandom')</code> which should technically try to translate the key into a language that doesn't exist, thus returning the key, but besides feeling wrong and hacky, this approach won't work if I want to preserve the fallback language funcionality of laravel, since the key would be found in the fallback language (en).</p>