Просмотр исходного кода

feat(locale): add locale toggle button on register/login page

hardywu 7 лет назад
Родитель
Сommit
beb575a458
2 измененных файлов с 10 добавлено и 0 удалено
  1. 5 0
      resources/views/login.blade.php
  2. 5 0
      resources/views/register.blade.php

+ 5 - 0
resources/views/login.blade.php

@@ -37,6 +37,11 @@
 <!-- END LOGO -->
 <!-- BEGIN LOGIN -->
 <div class="content">
+    @if(Session::get('locale') == 'zh-CN')
+        <a href="/?locale=en">English</a>
+    @else
+        <a href="/?locale=zh-CN">中文</a>
+    @endif
     <!-- BEGIN LOGIN FORM -->
     <form class="login-form" action="{{url('login')}}" method="post">
         <div class="alert alert-danger display-hide">

+ 5 - 0
resources/views/register.blade.php

@@ -37,6 +37,11 @@
 <!-- END LOGO -->
 <!-- BEGIN LOGIN -->
 <div class="content">
+    @if(Session::get('locale') == 'zh-CN')
+        <a href="/?locale=en">English</a>
+    @else
+        <a href="/?locale=zh-CN">中文</a>
+    @endif
     <!-- BEGIN REGISTRATION FORM -->
     <form class="register-form" action="{{url('register')}}" method="post" style="display: block;">
         @if($is_register)