package hr.fer.zemris.ffr.desktop.formCreator;

import java.text.Collator;
import java.util.Locale;

public class I18NUtil {
	
	private static Locale currentLocale;
	private static Collator currentCollator;
	private static Locale sortingLocale;
	private static Collator sortingCollator;
	
	public static void setCurrentLocale(Locale currentLocale) {
		I18NUtil.currentLocale = currentLocale;
		I18NUtil.currentCollator = Collator.getInstance(currentLocale);
	}

	public static void setSortingLocale(Locale sortingLocale) {
		I18NUtil.sortingLocale = sortingLocale;
		I18NUtil.sortingCollator = Collator.getInstance(sortingLocale);
	}

	public static Collator getSortingCollator() {
		return sortingCollator;
	}
	
	public static Locale getSortingLocale() {
		return sortingLocale;
	}
	
	public static Collator getCurrentCollator() {
		return currentCollator;
	}
	
	public static Locale getCurrentLocale() {
		return currentLocale;
	}
}
