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

nosi.core.i18n.I18nFactory Maven / Gradle / Ivy

Go to download

IGRP Framework is a powerful and highly customizable platform developed by the Operational Nucleus for the Information Society (NOSi) to create web applications, it provides out of box, several modules to make easy to create stand-alone, production-grade web applications: authentication and access-control, business processes automation, reporting, page builder with automatic code generation and incorporation of the Once-Only-Principle, written in Java. IGRP Framework WAR - Contains some keys resources that give UI to IGRP Framework and others supports files.

There is a newer version: 2.0.0.241121-RCM
Show newest version
package nosi.core.i18n;

import java.util.Locale;
import java.util.ResourceBundle;

/**
 * Marcel Iekiny
 * Oct 27, 2017
 */
public final class I18nFactory {

	private I18nFactory() {}
	
	public static I18n createI18n(String name, Locale locale) {  
		I18n i18n = null; 
		try {	
			i18n = new I18n(ResourceBundle.getBundle(name, locale)); 
		}catch(Exception e) { 
			try {
				i18n = new I18n(ResourceBundle.getBundle(I18nManager.DEFAULT_CORE_BUNDLE_NAME, locale)); 
			} catch (Exception e2) {
				// e.printStackTrace(); 
			}
		}
		return i18n;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy