Symfony is a very popular PHP framework which also consists of reusable components for cases when we want to use only some services only. In terms of i18n there are a lot of options such as the Translation Component for handling translation messages, the Intl component for displaying locale aware information and localized Routing configurations for handling URL paths to translated pages. We are going to leverage in full the provided abstractions with some advanced examples of those components in action.

In this article, we will explore the possibility of internationalizing a basic JSP/Servlet Web Application. At first, we will learn how to use JSTL Taglib to localize a JSP page. Furthermore, we will demonstrate the use of request parameter, session attribute, and the cookie value to choose a preferred language in a JSP page. Besides, we will use Maven to set up the project. Hence, we expect the reader has a basic knowledge of Java Web Application, JSP, JSTL, and Maven.

In this article, we'll have some fun with language and code. We'll build a "Pairs" game, inspired by one of the leading language learning mini-games. We'll use the Yandex Translate API to translate the words for the player on the fly and React to build out the UI. Let's play 🙃