Skip to content

Commit

Permalink
Merge pull request #218 from webreinvent/2.x-feature/update-users-loc…
Browse files Browse the repository at this point in the history
…alization

2.x feature -> 2.x develop | update users localization
  • Loading branch information
themodernpk authored Jan 4, 2024
2 parents 5c52029 + 0b43041 commit 21b0f59
Show file tree
Hide file tree
Showing 19 changed files with 8,885 additions and 351 deletions.
28 changes: 22 additions & 6 deletions Database/Seeders/VaahCmsTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ public function seedLanguageStrings()

$item['slug'] = Str::slug($item['name'],'_');

$exist = \DB::table( 'vh_lang_strings' )
->where( 'slug', $item['slug'] )
$lang = \DB::table( 'vh_lang_languages' )
->where( 'locale_code_iso_639', $item['locale_code_iso_639'] )
->first();


$lang = \DB::table( 'vh_lang_languages' )
->where( 'locale_code_iso_639', 'en' )
$exist = \DB::table( 'vh_lang_strings' )
->where('vh_lang_language_id', $lang->id)
->where( 'slug', $item['slug'] )
->first();

$cat = \DB::table( 'vh_lang_categories' )
Expand All @@ -174,6 +174,7 @@ public function seedLanguageStrings()
$item['vh_lang_category_id'] = $cat->id;

unset($item['category']);
unset($item['locale_code_iso_639']);

\DB::table( 'vh_lang_strings' )->insert( $item );
}
Expand All @@ -188,7 +189,22 @@ public function seedLanguageCategories()
["name" => 'User'],
["name" => 'Media'],
["name" => 'Localization'],
["name" => 'Login']
["name" => 'Login'],
["name" => 'Sidebar Menu'],
["name" => 'Dashboard'],
["name" => 'Registration'],
["name" => 'Crud Action'],
["name" => 'Role'],
["name" => 'Permission'],
["name" => 'General Setting'],
["name" => 'User Setting'],
["name" => 'Env Variable'],
["name" => 'Localization Setting'],
["name" => 'Notification Setting'],
["name" => 'Update Setting'],
["name" => 'Extend Module'],
["name" => 'Extend Theme'],
["name" => 'Validation'],
];

$this->storeSeeds('vh_lang_categories', $list);
Expand Down
Loading

0 comments on commit 21b0f59

Please sign in to comment.