Setting up internationalization.
This commit is contained in:
parent
21272c53b2
commit
de6a42d69a
|
|
@ -0,0 +1,9 @@
|
|||
navbar.language = Language
|
||||
navbar.signin = Sign in
|
||||
navbar.signup = Sign up
|
||||
navbar.logout = Logout
|
||||
navbar.my_animals = My animals
|
||||
navbar.cares_and_behaviors = Care and Behaviors
|
||||
|
||||
footer.license = Application under {0} license
|
||||
footer.source_code = Source code
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
navbar.language = Language
|
||||
navbar.signin = Sign in
|
||||
navbar.signup = Sign up
|
||||
navbar.logout = Logout
|
||||
navbar.my_animals = My animals
|
||||
navbar.cares_and_behaviors = Care and Behaviors
|
||||
|
||||
footer.source_code=Source code
|
||||
footer.license=Application under {0} license
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
navbar.language = Langue
|
||||
navbar.signin = Connexion
|
||||
navbar.signup = Cr\u00e9er un compte
|
||||
navbar.logout = D\u00e9connexion
|
||||
navbar.my_animals = Mes animaux
|
||||
navbar.cares_and_behaviors = Soins et Comportements
|
||||
|
||||
footer.source_code=Code source
|
||||
footer.license=Application sous licence {0}
|
||||
|
|
@ -2,9 +2,10 @@
|
|||
<%@page import="java.util.List"%>
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
||||
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ page isELIgnored="false" %>
|
||||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@
|
|||
<%@page import="java.util.List"%>
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
||||
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ page isELIgnored="false" %>
|
||||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
<spring:url value="/animal/${MODEL_MAP_ANIMAL.getId()}/add/consent_behavior" var="animalAddConsentBehaviorURL" />
|
||||
<spring:url value="/animal/${MODEL_MAP_ANIMAL.getId()}/delete/consent_behavior" var="animalDeleteConsentBehaviorURL" />
|
||||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@
|
|||
<%@page import="java.util.List"%>
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
||||
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ page isELIgnored="false" %>
|
||||
<spring:url value="/animal/delete" var="animalDeleteURL" />
|
||||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<%@ include file="base/header.jsp" %>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
<!--<footer style="text-align: center;">-->
|
||||
<footer style="text-align: center;">
|
||||
<p style="font-size: 0.8em;"><img src="${logoPNG}" alt="Logo Koario" style="max-height: 20px;" /> Medical Training Tracker</p>
|
||||
<p style="font-size: 0.8em;">Application sous licence <a href="https://git.kingpenguin.tk/chteufleur/MedicalTrainingTracker/src/branch/master/LICENSE">MIT</a></p>
|
||||
<p><a href="https://git.kingpenguin.tk/chteufleur/MedicalTrainingTracker" style="font-size: 0.8em;">Code source</a></p>
|
||||
<p style="font-size: 0.8em;">
|
||||
<fmt:message key="footer.license">
|
||||
<fmt:param value="<a href=\"https://git.kingpenguin.tk/chteufleur/MedicalTrainingTracker/src/branch/master/LICENSE\">MIT</a>" />
|
||||
</fmt:message>
|
||||
<p><a href="https://git.kingpenguin.tk/chteufleur/MedicalTrainingTracker" style="font-size: 0.8em;"><fmt:message key="footer.source_code"></fmt:message></a></p>
|
||||
</footer>
|
||||
|
|
@ -2,9 +2,6 @@
|
|||
<spring:url value="/static/bootstrap/css/starter-template.css" var="bootstrapStarterTemplateCSS" />
|
||||
<spring:url value="/static/img/favicon.png" var="favicon" />
|
||||
|
||||
|
||||
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
|
||||
<c:set var="language" value="${not empty param.language ? param.language : not empty language ? language : pageContext.request.locale}" scope="session" />
|
||||
<fmt:setLocale value="${language}" />
|
||||
<fmt:setBundle basename="messages" />
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@page import="org.springframework.security.core.Authentication"%>
|
||||
<%@page import="fr.geoffrey.medical_training_tracker.controller.IndexController"%>
|
||||
<%@ page isELIgnored="false" %>
|
||||
|
||||
<spring:url value="/static/img/logo.png" var="logoPNG" />
|
||||
<spring:url value="/" var="indexURL" />
|
||||
<spring:url value="/animal" var="animalURL" />
|
||||
|
|
@ -24,20 +26,13 @@
|
|||
<a class="navbar-brand" href="${indexURL}"><div><img src="${logoPNG}" alt="Logo" style="max-height: 30px;"/> Medical Training Tracker</div></a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<!-- <ul class="nav navbar-nav">
|
||||
<% if (authentication != null) { %>
|
||||
<c:forEach items="${MODEL_MAP_ANIMAL_LIST}" var="animal">
|
||||
<li <c:if test="${MODEL_MAP_ANIMAL.getId() == animal.getId()}">class="active"</c:if> ><a href="${animalURL}/${animal.getId()}">${animal.getName()}</a></li>
|
||||
</c:forEach>
|
||||
<% }%>
|
||||
</ul>-->
|
||||
<ul class="nav navbar-nav">
|
||||
<% if (authentication != null) { %>
|
||||
<c:forEach items="${MODEL_MAP_ANIMAL_LIST}" var="animal">
|
||||
<li class="dropdown" <c:if test="${MODEL_MAP_ANIMAL.getId() == animal.getId()}">class="active"</c:if> >
|
||||
<li class="dropdown <c:if test="${MODEL_MAP_ANIMAL.getId() == animal.getId()}">active</c:if>" >
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">${animal.getName()} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="${animalURL}/${animal.getId()}/cares_and_behaviors">Soins et Comportements</a></li>
|
||||
<li><a href="${animalURL}/${animal.getId()}/cares_and_behaviors"><fmt:message key="navbar.cares_and_behaviors"></fmt:message></a></li>
|
||||
<li><a href="${animalURL}/${animal.getId()}/progressions">Progressions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
@ -46,12 +41,19 @@
|
|||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<% if (authentication == null) { %>
|
||||
<li><a href="${loginURL}">Login</a></li>
|
||||
<li><a href="${registerURL}">Crée un compte</a></li>
|
||||
<% } else { %>
|
||||
<li><a href="${animalURL}">Mes animaux</a></li>
|
||||
<li><a href="${deconnexionURL}">Déconnexion</a></li>
|
||||
<% }%>
|
||||
<li><a href="${loginURL}"><fmt:message key="navbar.signin"></fmt:message></a></li>
|
||||
<li><a href="${registerURL}"><fmt:message key="navbar.signup"></fmt:message></a></li>
|
||||
<% } else { %>
|
||||
<li><a href="${animalURL}"><fmt:message key="navbar.my_animals"></fmt:message></a></li>
|
||||
<li><a href="${deconnexionURL}"><fmt:message key="navbar.logout"></fmt:message></a></li>
|
||||
<% }%>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><fmt:message key="navbar.language"></fmt:message> (${language})<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?language=en">English</a></li>
|
||||
<li><a href="?language=fr">Français</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
||||
<%@ page isELIgnored="false" %>
|
||||
|
||||
<html>
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="${language}">
|
||||
<head>
|
||||
<%@ include file="base/header.jsp" %>
|
||||
<style type="text/css">
|
||||
|
|
|
|||
Loading…
Reference in New Issue