About WebTranslateIt.com

WebTranslateIt.com is a web-based translation tool to translate documents and software.

Learn more at WebTranslateIt.com.

Recent posts in the same category

New in WebTranslateIt: Improvements to PHP Laravel and JSON files support

Posted by Estelle on September 19, 2017

We released an update to the language file handler on WebTranslateIt. We improved the Laravel file handler and the JSON file handler. Other improvements will come along the way.

Support for short-hand arrays in PHP Laravel files

WebTranslateIt now supports short-hand arrays in PHP Laravel files.

Instead of uploading PHP Laravel files containing arrays defined like this:

<?php
return array(
  'foo' => array(
    'subject' => 'Test'
  ),
  'bar' => array(
    'subject' => 'Test 2'
  )
);

You can now upload and download language files looking like that:

<?php
return [
  'foo' => [
    'subject' => 'Test'
  ],
  'bar' => [
    'subject' => 'Test 2'
  ]
];

Custom indentation for JSON files

WebTranslateIt indents all the language files with spaces 😂 but we believe that it is a matter of taste and we shouldn’t impose our spaces indentation. It also makes huge diffs when you download back your language files to version control.

Starting today when uploading a JSON file it detects which kind of indentation you are using (2 spaces, 4 spaces, 1 tab, 2 tabs) and it saves this information to database. When generating your JSON language file we will put your original indentation back on.

More importantly, we laid the ground work for having this feature working for all files handlers. We’ll add custom indentation support for all the other file formats soon.


Want more? Follow us on Facebook and Twitter