Commons/src/main/java/eu/univento/commons/player/language/Translation.java

32 lines
688 B
Java

/*
* Copyright (c) 2017 univento.eu - All rights reserved
* You are not allowed to use, distribute or modify this code
*/
package eu.univento.commons.player.language;
import lombok.Getter;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Locale;
/**
* @author joethei
* @version 1.0
*/
@Getter
@Table(name="translations")
class Translation {
@Id private int id;
private String identifier;
private String german;
private String english;
//TODO: optimize
String getTranslation(Locale locale) {
if(locale == Locale.GERMAN) return german;
if(locale == Locale.ENGLISH) return english;
return null;
}
}