- 5.页面国际化:网页中文和英文相互转换
- 修改默认编码为UTF-8
- login
login.tip=请登录
login.password=密码
login.remember 记住我
login.username=用户名
login.btn=登录
- login_us
login.tip=please sign in
login.password=Password
login.remember=remember me
login.username=Username
login.btn=Sign in
- login_cn
login.tip=请登录
login.password=密码
login.remember=记住我
login.username=用户名
login.btn=登录
- 添加message配置
spring.messages.basename=i18n.login
- 修改html
<h1 class="h3 mb-3 font-weight-normal" th:text="#{login.tip}">Please sign in</h1>
<input type="text" class="form-control" th:placeholder="#{login.username}" required="" autofocus="">
<input type="password" class="form-control" th:placeholder="#{login.password}" required="">
<div class="checkbox mb-3">
<label>
<input type="checkbox" value="remember-me">[[#{login.remember}]]
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">[[#{login.btn}]]</button>
标签:username,password,remember,tip,50,230127,login,btn,SpringBoot
From: https://www.cnblogs.com/wcwblog/p/17069388.html