/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model.company;

import java.util.Locale;

/**
 *
 * @author patri
 */
public enum Status {
    ACTIVE,
    INACTIVE;

    private Status() {
    }

    @Override
    public String toString() {
        switch(this){
            case ACTIVE:
                return "aktiv";
            case INACTIVE:
                return "inaktiv";
            default:
                return "";
        }
    }
    
    public String toLanguageString(Locale locale){
        if (locale == null ||locale.equals(Locale.GERMAN) || locale.equals(Locale.GERMANY)) {
            return getGerman();
        }
        
        if (locale.equals(Locale.ENGLISH)) {
            getEnglish();
        }
        
        return "";
    }
    
    private String getGerman() {
        return toString();
    }
    
    private String getEnglish(){
        switch(this){
            case ACTIVE:
                return "active";
            case INACTIVE:
                return "inactive";
            default:
                return "";
        }
    }
}
