Giter Site home page Giter Site logo

translations's Introduction

Translations

Spring boot application for adding i18n support to portlets and soffits using i18next

Overview

This application makes heavy use of the factory pattern. This makes it easy to add new portlets/soffits to the translation service. To add a new portlet/soffit, first make a new model that extends Transalations that has all of the translation information. For anything that is shared across all portlets/soffits it can be added to Transalations.java. Then to make a translation service, implement the ITranslationsService interface and have a @Component("portlet_name") annotation on the class.

Caching

When creating a new @Component that component's name needs to be appended to the application.properties file with the rest of the cac he names. The Cacheable annotation should follow the following format @Cacheable(value = "portlet_name", key = "{ #root.methodName, #languageCode }")

To view the translations go to /api/v1/locales/{porlet_name}/{lng}/{ns}. If no portlet/soffit name is found, it will return a 404.

Building

./gradlew clean assemble

Deploying

Copy over the compiled war file to tomcat or use the built in tomcat ./gradlew bootRun

translations's People

Contributors

bpowell avatar colcampbe3 avatar joshbrudnak avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.