All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softicar.platform.common.core.i18n.CurrentLanguageTranslator Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.core.i18n;

import com.softicar.platform.common.core.singleton.Singleton;

/**
 * This is a {@link Singleton} to hold the currently used
 * {@link ILanguageTranslator}.
 * 

* It is used to translate texts into the currently selected language. * * @author Oliver Richers */ public class CurrentLanguageTranslator { private static final Singleton CURRENT_TRANSLATOR = new Singleton<>(IdentityLanguageTranslator::get); /** * Returns the currently selected language translator, which is * {@link IdentityLanguageTranslator} by default. * * @return the current translator, never null */ public static ILanguageTranslator get() { return CURRENT_TRANSLATOR.get(); } /** * Sets the currently selected language translator to the specified * instance. */ public static void set(ILanguageTranslator translator) { CURRENT_TRANSLATOR.set(translator); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy