Example #1
0
 public function run()
 {
     Language::truncate();
     $data = array(array('name' => 'English', 'code' => 'en'), array('name' => 'German', 'code' => 'de'), array('name' => 'Myanmar', 'code' => 'mm'));
     Language::insert($data);
     Translation::truncate();
     $data = array(array('message' => 'ThisIsTest', 'translation' => 'This is Test', 'language_id' => 1, 'group_id' => 2), array('message' => 'TestReplace', 'translation' => 'This is Test :name', 'language_id' => 1, 'group_id' => 2), array('message' => 'TestChoice', 'translation' => 'This is one cow|There are many cows', 'language_id' => 1, 'group_id' => 2), array('message' => 'TestChoicePlu', 'translation' => '{0} There are none|[1,19] There are some|[20,Inf] There are many', 'language_id' => 1, 'group_id' => 2), array('message' => 'ThisIsTest', 'translation' => 'This is Test in Myanmar', 'language_id' => 3, 'group_id' => 2));
     Translation::insert($data);
     Group::truncate();
     $data = array(array('name' => 'validation'), array('name' => 'general'));
     Group::insert($data);
 }
 public function getLanguageDelete($id = null)
 {
     $language = Language::find($id);
     if ($language) {
         $language->delete();
     }
     return Redirect::action('Ideaterminal\\Transdb\\Controllers\\TransdbController@getLanguage');
 }