We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9de09b3 commit 68cbf7bCopy full SHA for 68cbf7b
config/config.php
@@ -50,6 +50,8 @@
50
51
'should_translate' => false,
52
53
+ 'default_language' => 'en',
54
+
55
'use_default_view_for' => [],
56
57
'views_folder' => 'post_type'
src/Cms.php
@@ -28,7 +28,9 @@ public function registerPostTypes($postTypes): void
28
$name = Str::title(str_replace('-', ' ', $slug));
29
$type->name = $data['name'] ?? $name;
30
$type->singular_name = $data['name_singular'] ?? Str::singular($data['name'] ?? $name);
31
- if (config('cms.should_translate')) $type->lang = Languages::default();
+ if (config('cms.should_translate')) {
32
+ $type->lang = config('cms.default_language');
33
+ }
34
35
$type->slug = $slug;
36
$type->icon = $data['icon'];
0 commit comments