diff --git a/app/index/common.php b/app/index/common.php
index 0610181f..35395eec 100644
--- a/app/index/common.php
+++ b/app/index/common.php
@@ -1,6 +1,8 @@
controller() . '/' . request()->action());
+ $lang_key = "{$path}.{$name}";
+ if (!Lang::has($lang_key, $lang)) {
+ return Lang::get($name, $vars, $lang);
+ }
+ return Lang::get($lang_key, $vars, $lang);
+ }
+}
diff --git a/app/index/controller/ContactUs.php b/app/index/controller/ContactUs.php
index 4da9e34a..d61da2b1 100644
--- a/app/index/controller/ContactUs.php
+++ b/app/index/controller/ContactUs.php
@@ -89,10 +89,10 @@ class ContactUs extends Common
'user_agent' => request()->header('user-agent'),
]);
if ($msg->isEmpty()) {
- return error(lang('contact_message.send_fail'));
+ return error(lang('信息提交失败!'));
}
- return success(lang('contact_message.send_success'));
+ return success(lang('信息已成功提交!'));
}
$focus_image = [];
@@ -103,6 +103,7 @@ class ContactUs extends Common
->where('status', '=', 1)
->order(['sort' => 'asc', 'id' => 'desc']);
}])
+ ->atPlatform(request()->from)
->uniqueLabel([
'BANNER_6801be1e7d686',
'BANNER_6801c053ce12e',
diff --git a/app/index/lang/en-us/mobile.php b/app/index/lang/en-us/mobile.php
index 9caf1bbc..a4f83ffd 100644
--- a/app/index/lang/en-us/mobile.php
+++ b/app/index/lang/en-us/mobile.php
@@ -1,74 +1,121 @@
'Home',
+ '产品列表' => 'Products',
'搜索' => 'Search',
'搜索历史' => 'Search History',
'请择地区' => 'SELECT A REGION',
- '首页' => 'Home',
- '产品列表' => 'Products',
'产品' => 'Product',
'联系方式' => 'Contact',
- '查看所有' => 'View All',
- '查看全部' => 'View All',
- '明星产品/热点产品' => 'Featured Products',
- '了解更多' => 'Learn More',
- 'Orico 技术' => 'ORICO Technology',
- '强大功能、简单使用' => 'designed to be just as easy to learn as iPhone. chatting with friends.',
- '常见问题' => 'FAQ',
- '回答您最关心的问题' => 'What are you most concerned about',
- '客服团队的工作时间:周一到周五,早9点到晚6点 平均应答时间:24小时内' => 'Our customer support is available Monday to Friday: 9am-6:00pm. Average answer time: 24h',
- '发送查询' => 'Send Inquiry',
- '型号' => 'Model',
- '产品描述' => 'Product Description',
- '关联产品' => 'Related Products',
- '姓名' => 'Name',
- '请输入您的名称' => 'First name',
- '请输入您的姓氏' => 'Last name',
- '公司/组织' => 'Company/Organization',
- '电子邮箱' => 'Email',
- '电话号码' => 'Phone Number',
- '国家' => 'Country',
- '请选择所属国家' => 'Select your country',
- '行业' => 'Industry',
- '询问内容' => 'Inquiry',
- '提交' => 'SUBMIT',
+
+ // 返回文本
'信息已成功提交!' => 'Add Success!',
'信息提交失败!' => 'Add Fail!',
- // 附件下载
- '软件下载' => 'Software download',
- '支持型号' => 'Supported Models',
- '支持系统' => 'Supported Systems',
- '全站搜索' => 'Search',
- '搜索' => 'Search',
- '请搜索' => 'Please search...',
+ // 首页
+ 'index/index' => [
+ '查看所有' => 'View All',
+ '明星产品/热点产品' => 'Featured Products',
+ '了解更多' => 'Learn More',
+ 'Orico 技术' => 'ORICO Technology',
+ '强大功能、简单使用' => 'designed to be just as easy to learn as iPhone. chatting with friends.',
+ '常见问题' => 'FAQ',
+ '回答您最关心的问题' => 'What are you most concerned about',
+ '客服团队的工作时间:周一到周五,早9点到晚6点 平均应答时间:24小时内' => 'Our customer support is available Monday to Friday: 9am-6:00pm. Average answer time: 24h',
+ ],
- // 成为分销商页面
- '成为经销商' => 'Become a Distributor',
- '准备好加入我们了吗?
在下面输入您的详细信息,我们的销售团队将在2个工作日内回复您。' => 'Ready to join us?
Enter your details below and our Sales team will get back to you within 2 business days.',
- '公司名称' => 'Company Name',
- '请输入公司名称' => 'Enter your Company Name',
- '电子邮件' => 'Contact Email',
- '请输入邮箱' => 'Enter your Email',
- '电话号码' => 'Phone Number',
- '请输入电话号码' => 'Enter your Phone Number',
- '业务类型' => 'Type of Business',
- '在线商店网址' => 'Online Store URL',
- '企业规模' => 'Enterprise Size',
- '公司地址' => 'Company Address',
- '请输入地址' => 'Enter Address',
- '留言' => 'Message',
- '请输入留言' => 'Enter your message',
- // 批量购买页面
- '批量购买' => 'Bulk Buy',
- '法定营业名称' => 'Legal business name',
- '官方网站' => 'Official website',
- '请粘贴网址' => 'Please paste the URL',
- '姓名' => 'Your Name',
- '姓' => 'Last name',
- '名' => 'First name',
- '邮箱' => 'Email',
- '电话号码' => 'Phone Number',
- '您对哪个产品品类感兴趣?' => 'Products you are interested in?',
- '当前选定语言的采购可选品类配置出错' => 'The procurement category configuration for the currently selected language is incorrect',
+ // 产品分类
+ 'product/category' => [
+ '查看全部' => 'View All',
+ ],
+ // 产品搜索
+ 'product/search' => [
+ '搜索' => 'Search',
+ '请搜索' => 'Please search...',
+ ],
+ // 产品详情
+ 'product/detail' => [
+ '首页' => 'Home',
+ '型号' => 'Model',
+ '发送查询' => 'Send Inquiry',
+ '产品描述' => 'Product Description',
+ '关联产品' => 'Related Products',
+ '姓名' => 'Name',
+ '请输入您的名称' => 'First name',
+ '请输入您的姓氏' => 'Last name',
+ '公司/组织' => 'Company/Organization',
+ '邮箱' => 'Email',
+ '电话号码' => 'Phone Number',
+ '国家' => 'Country',
+ '请选择所属国家' => 'Select your country',
+ '行业' => 'Industry',
+ '询问内容' => 'Inquiry',
+ '提交' => 'SUBMIT',
+ ],
+
+ // 附件下载
+ 'attachment/index' => [
+ '软件下载' => 'Software download',
+ '支持型号' => 'Supported Models',
+ '支持系统' => 'Supported Systems',
+ '全站搜索' => 'Search',
+ '搜索' => 'Search',
+ '请搜索' => 'Please search...',
+ ],
+ 'attachment/video' => [
+ '软件和驱动程序' => 'Software and Drivers',
+ '您的浏览器不支持 video 标签。' => 'Your browser does not support HTML5 video.',
+ ],
+
+ // 联系我们批量购买页面
+ 'contactus/bulkbuy' => [
+ '批量购买' => 'Bulk Buy',
+ '公司名称' => 'Company Name',
+ '法定营业名称' => 'Legal business name',
+ '官方网站' => 'Official website',
+ '请粘贴网址' => 'Please paste the URL',
+ '姓名' => 'Your Name',
+ '姓' => 'Last name',
+ '名' => 'First name',
+ '邮箱' => 'Email',
+ '请输入邮箱' => 'Enter your Email',
+ '电话号码' => 'Phone Number',
+ '请输入电话号码' => 'Enter your Phone Number',
+ '您对哪个产品品类感兴趣?' => 'Products you are interested in?',
+ '留言' => 'Message',
+ '请输入留言' => 'Enter your message',
+ '提交' => 'SUBMIT',
+ ],
+ // 联系我们成为分销商页面
+ 'contactus/distributor' => [
+ '成为经销商' => 'Become a Distributor',
+ '准备好加入我们了吗?
在下面输入您的详细信息,我们的销售团队将在2个工作日内回复您。' => 'Ready to join us?
Enter your details below and our Sales team will get back to you within 2 business days.',
+ '公司名称' => 'Company Name',
+ '请输入公司名称' => 'Enter your Company Name',
+ '电子邮件' => 'Contact Email',
+ '请输入邮箱' => 'Enter your Email',
+ '电话号码' => 'Phone Number',
+ '请输入电话号码' => 'Enter your Phone Number',
+ '业务类型' => 'Type of Business',
+ '在线商店网址' => 'Online Store URL',
+ '企业规模' => 'Enterprise Size',
+ '公司地址' => 'Company Address',
+ '请输入地址' => 'Enter Address',
+ '留言' => 'Message',
+ '请输入留言' => 'Enter your message',
+ '提交' => 'SUBMIT',
+ ],
+ // 联系我们留言页
+ 'contactus/message' => [
+ '我们的信息' => 'Our Information',
+ '姓名' => 'Your name',
+ '电子邮箱' => 'Your email',
+ '您的问题' => 'Your message',
+ '提交您的问题' => 'Send Us Your Question',
+ '请输入内容...' => 'This is your placeholder text',
+ '发送' => 'SEND',
+ '成为经销商' => 'Become a Distributor',
+ ],
];
\ No newline at end of file
diff --git a/app/index/lang/en-us/validate.php b/app/index/lang/en-us/validate.php
index 2a47a3a4..fdd0ffca 100644
--- a/app/index/lang/en-us/validate.php
+++ b/app/index/lang/en-us/validate.php
@@ -1,39 +1,37 @@
'Company Name is required',
- '公司名称不能超过64个字符' => 'Company Name cannot exceed 64 characters',
+ '姓不能为空' => 'Last name is required',
+ '姓不能超过:rule个字符' => 'Last name cannot exceed :rule characters',
+ '名不能为空' => 'First Name is required',
+ '名不能超过:rule个字符' => 'First name cannot exceed :rule characters',
+ '姓名不能为空' => 'Name is required',
+ '姓名不能超过:rule个字符' => 'Name cannot exceed :rule characters',
+ '电话号码不能为空' => 'Phone Number is required',
+ '电话号码不能超过:rule个字符' => 'Phone number cannot exceed :rule characters',
+ '感兴趣的产品种类不能超过:rule个字符' => 'Interested product categories cannot exceed :rule characters',
'邮箱不能为空' => 'Email is required',
'邮箱格式不正确' => 'Email format is incorrect',
- '邮箱不能超过128个字符' => 'Email cannot exceed 128 characters',
- '电话号码不能为空' => 'Phone Number is required',
- '电话号码不能超过64个字符' => 'Phone Number cannot exceed 64 characters',
- '业务类型不能为空' => 'Type of Business is required',
- '业务类型不能超过128个字符' => 'Type of Business cannot exceed 128 characters',
- '企业规模不能为空' => 'Enterprise Size is required',
- '企业规模不能超过128个字符' => 'Enterprise Size cannot exceed 128 characters',
- '公司地址不能为空' => 'Company Address is required',
- '公司地址不能超过255个字符' => 'Company Address cannot exceed 255 characters',
- '留言不能为空' => 'Message is required',
- '公司名称不能超过128个字符' => 'Company name cannot exceed 128 characters',
- '网址不能超过255个字符' => 'URL cannot exceed 255 characters',
- '名不能为空' => 'First Name is required',
- '名不能超过64个字符' => 'First name cannot exceed 64 characters',
- '姓不能为空' => 'Last name is required',
- '姓不能超过64个字符' => 'Last name cannot exceed 64 characters',
- '电话号码不能超过32个字符' => 'Phone number cannot exceed 32 characters',
- '感兴趣的产品种类不能超过255个字符' => 'Interested product categories cannot exceed 255 characters',
- '留言内容不能为空' => 'Message content is required',
- '留言内容不能超过1024个字符' => 'Message content cannot exceed 1024 characters',
- '姓名不能为空' => 'Name is required',
- '问题不能为空' => 'Question is required',
- '问题不能超过1024个字符' => 'Question cannot exceed 1024 characters',
+ '邮箱不能超过:rule个字符' => 'Email cannot exceed :rule characters',
'国家不能为空' => 'Country is required',
- '国家不能超过128个字符' => 'Country cannot exceed 128 characters',
+ '国家不能超过:rule个字符' => 'Country cannot exceed :rule characters',
+ '网址不能超过:rule个字符' => 'URL cannot exceed :rule characters',
+ '公司名称不能为空' => 'Company Name is required',
+ '公司名称不能超过:rule个字符' => 'Company name cannot exceed :rule characters',
+ '公司地址不能为空' => 'Company Address is required',
+ '公司地址不能超过:rule个字符' => 'Company Address cannot exceed :rule characters',
+ '企业规模不能为空' => 'Enterprise Size is required',
+ '企业规模不能超过:rule个字符' => 'Enterprise Size cannot exceed :rule characters',
+ '业务类型不能为空' => 'Type of Business is required',
+ '业务类型不能超过:rule个字符' => 'Type of Business cannot exceed :rule characters',
'公司/组织不能为空' => 'Company/Organization is required',
- '公司/组织不能超过128个字符' => 'Company/Organization cannot exceed 128 characters',
+ '公司/组织不能超过:rule个字符' => 'Company/Organization cannot exceed :rule characters',
'行业不能为空' => 'Industry is required',
- '行业不能超过64个字符' => 'Industry cannot exceed 64 characters',
+ '行业不能超过:rule个字符' => 'Industry cannot exceed :rule characters',
'询问内容不能为空' => 'Inquiry is required',
- '询问内容不能超过1024个字符' => 'Inquiry cannot exceed 1024 characters',
+ '询问内容不能超过:rule个字符' => 'Inquiry cannot exceed :rule characters',
+ '留言内容不能为空' => 'Message content is required',
+ '留言内容不能超过:rule个字符' => 'Message content cannot exceed :rule characters',
+ '问题不能为空' => 'Question is required',
+ '问题不能超过:rule个字符' => 'Question cannot exceed :rule characters',
];
\ No newline at end of file
diff --git a/app/index/validate/ContactUsBulkBuyValidate.php b/app/index/validate/ContactUsBulkBuyValidate.php
index 00cb549b..e3517abc 100644
--- a/app/index/validate/ContactUsBulkBuyValidate.php
+++ b/app/index/validate/ContactUsBulkBuyValidate.php
@@ -32,18 +32,18 @@ class ContactUsBulkBuyValidate extends Validate
*/
protected $message = [
'corp_name.require' => '公司名称不能为空',
- 'corp_name.max' => '公司名称不能超过128个字符',
- 'url.max' => '网址不能超过255个字符',
+ 'corp_name.max' => '公司名称不能超过:rule个字符',
+ 'url.max' => '网址不能超过:rule个字符',
'first_name.require' => '名不能为空',
- 'first_name.max' => '名不能超过64个字符',
+ 'first_name.max' => '名不能超过:rule个字符',
'last_name.require' => '姓不能为空',
- 'last_name.max' => '姓不能超过64个字符',
+ 'last_name.max' => '姓不能超过:rule个字符',
'email.require' => '邮箱不能为空',
'email.email' => '邮箱格式不正确',
- 'email.max' => '邮箱不能超过128个字符',
- 'phone.max' => '电话号码不能超过32个字符',
- 'interested.max' => '感兴趣的产品种类不能超过255个字符',
+ 'email.max' => '邮箱不能超过:rule个字符',
+ 'phone.max' => '电话号码不能超过:rule个字符',
+ 'interested.max' => '感兴趣的产品种类不能超过:rule个字符',
'message.require' => '留言内容不能为空',
- 'message.max' => '留言内容不能超过1024个字符',
+ 'message.max' => '留言内容不能超过:rule个字符',
];
}
diff --git a/app/index/validate/ContactUsDistributorValidate.php b/app/index/validate/ContactUsDistributorValidate.php
index 67ab1900..5ad6a68a 100644
--- a/app/index/validate/ContactUsDistributorValidate.php
+++ b/app/index/validate/ContactUsDistributorValidate.php
@@ -31,18 +31,18 @@ class ContactUsDistributorValidate extends Validate
*/
protected $message = [
'corp_name.require' => '公司名称不能为空',
- 'corp_name.max' => '公司名称不能超过64个字符',
+ 'corp_name.max' => '公司名称不能超过:rule个字符',
'email.require' => '邮箱不能为空',
'email.email' => '邮箱格式不正确',
- 'email.max' => '邮箱不能超过128个字符',
+ 'email.max' => '邮箱不能超过:rule个字符',
'phone.require' => '电话号码不能为空',
- 'phone.max' => '电话号码不能超过64个字符',
+ 'phone.max' => '电话号码不能超过:rule个字符',
'business_type.require' => '业务类型不能为空',
- 'business_type.max' => '业务类型不能超过128个字符',
+ 'business_type.max' => '业务类型不能超过:rule个字符',
'enterprise_size.require' => '企业规模不能为空',
- 'enterprise_size.max' => '企业规模不能超过128个字符',
+ 'enterprise_size.max' => '企业规模不能超过:rule个字符',
'address.require' => '公司地址不能为空',
- 'address.max' => '公司地址不能超过255个字符',
+ 'address.max' => '公司地址不能超过:rule个字符',
'message.require' => '留言不能为空',
];
}
diff --git a/app/index/validate/ContactUsMessageValidate.php b/app/index/validate/ContactUsMessageValidate.php
index 738f6d8d..c1dc2414 100644
--- a/app/index/validate/ContactUsMessageValidate.php
+++ b/app/index/validate/ContactUsMessageValidate.php
@@ -27,11 +27,11 @@ class ContactUsMessageValidate extends Validate
*/
protected $message = [
'name.require' => '姓名不能为空',
- 'name.max' => '姓名不能超过64个字符',
+ 'name.max' => '姓名不能超过:rule个字符',
'email.require' => '邮箱不能为空',
'email.email' => '邮箱格式不正确',
- 'email.max' => '邮箱不能超过128个字符',
+ 'email.max' => '邮箱不能超过:rule个字符',
'content.require' => '问题不能为空',
- 'content.max' => '问题不能超过1024个字符'
+ 'content.max' => '问题不能超过:rule个字符'
];
}
diff --git a/app/index/validate/ProductInquiryValidate.php b/app/index/validate/ProductInquiryValidate.php
index c696fea9..a9629a96 100644
--- a/app/index/validate/ProductInquiryValidate.php
+++ b/app/index/validate/ProductInquiryValidate.php
@@ -32,20 +32,20 @@ class ProductInquiryValidate extends Validate
*/
protected $message = [
'first_name.require' => '名不能为空',
- 'first_name.max' => '名不能超过64个字符',
+ 'first_name.max' => '名不能超过:rule个字符',
'last_name.require' => '姓不能为空',
- 'last_name.max' => '姓不能超过64个字符',
+ 'last_name.max' => '姓不能超过:rule个字符',
'email.require' => '邮箱不能为空',
'email.email' => '邮箱格式不正确',
- 'email.max' => '邮箱不能超过128个字符',
- 'phone.max' => '电话号码不能超过32个字符',
+ 'email.max' => '邮箱不能超过:rule个字符',
+ 'phone.max' => '电话号码不能超过:rule个字符',
'country_name.require' => '国家不能为空',
- 'country_name.max' => '国家不能超过128个字符',
+ 'country_name.max' => '国家不能超过:rule个字符',
'corp_name.require' => '公司/组织不能为空',
- 'corp_name.max' => '公司/组织不能超过128个字符',
+ 'corp_name.max' => '公司/组织不能超过:rule个字符',
'industry.require' => '行业不能为空',
- 'industry.max' => '行业不能超过64个字符',
+ 'industry.max' => '行业不能超过:rule个字符',
'message.require' => '询问内容不能为空',
- 'message.max' => '询问内容不能超过1024个字符'
+ 'message.max' => '询问内容不能超过:rule个字符'
];
}
diff --git a/app/index/view/mobile/attachment/index.html b/app/index/view/mobile/attachment/index.html
index e6b4df30..f314815b 100644
--- a/app/index/view/mobile/attachment/index.html
+++ b/app/index/view/mobile/attachment/index.html
@@ -1,6 +1,6 @@
{extend name="public/base" /}
{block name="style"}
-
+
{/block}
{block name="main"}
{:lang('支持型号')}: {$att.applicable_to}
-{:lang('支持系统')}: {$att.support_platform}
+{:lang_i18n('支持型号')}: {$att.applicable_to}
+{:lang_i18n('支持系统')}: {$att.support_platform}