Browse Source

Refactors localization handling

Removed translations from the source code to fix Problems regarding
wrong character sets corrupting source files on Windows PCs.
Added Method to read Translations from file.
Added Translation files for DE, CZ, ES, ZH.
Andreas T. Meyer-Berg 7 years ago
parent
commit
e72c19907a
5 changed files with 620 additions and 236 deletions
  1. 119 0
      res/Texts/CZ.lang
  2. 119 0
      res/Texts/DE.lang
  3. 120 0
      res/Texts/ES.lang
  4. 119 0
      res/Texts/ZH.lang
  5. 143 236
      src/ui/view/Languages.java

+ 119 - 0
res/Texts/CZ.lang

@@ -0,0 +1,119 @@
+# ToolBar (0-16)
+File
+New
+Open
+Save
+Edit
+Undo
+Redo
+Find/Replace
+Edit showed Information
+Options
+Reset Categories
+View
+View Size
+Help
+About Us
+Edit Edges
+Language
+# Tables (17-24)
+Object
+Nr.
+Device
+Energy
+Quantity
+Activated
+Field
+Information
+# Graph (25-26)
+None 
+Reset
+# Warning PopUps(27-30)
+Warning
+Do you want to save your current data?
+Do you really want to delete the Category 
+Please select a Category or an Object in order to delete something.
+#Edit Edges Pop Up (31-34)
+Edit Showed Informations
+Show Total Energy of Objects
+Show Connection Properties
+Cancel
+# Search/Replace Pop Up (35-45)
+Search for Objects
+Find
+Replace
+Direction
+Forward
+Backward
+Scope
+All
+Single
+Replace All
+Close
+# Edit Edges Pop Up (46-55)
+Edit Capacities of Edges
+Maximum Capacity:
+Change for all existing Edges only
+Change for new created Edges only
+Change for all existing and new created Edges
+Cancel
+Please select one of the options
+Please enter a number greater or equal 0 in the Field for Maximum Capacity
+Edit Edge Capacities
+(enter \"infinite\" for infinite Capacity)
+# Add PopUp Tree (56-63)
+Please enter a Name for Category 
+Please select a Category first before adding 
+Add Object Menu
+Name:
+Browse Image
+Add Element
+Delete Element
+Cancel
+# Add PopUp Element (64-71)
+Add Element to Object
+Element Name:
+Provided Energy:
+Amount:
+Please enter numbers in the Fields amount and providedEnergy
+No name
+Name already given
+Cancel
+# Info for PropertyTable (72-82)
+Name
+Total Energy
+Manual
+Active
+ is connected to
+ with ID: 
+Edge: 
+ to 
+Current flow
+Max. Capacity
+Status
+# Info SimulationMenu (83-87)
+Simulate
+Simulation Speed:
+Algorithm:
+choose folder
+success
+# Exit Pop Up (88)
+Are you sure you want to exit?
+# Simulation ToolTip (89-93)
+Play
+Reset
+Forward
+Backward
+Time Slider"
+# Image Size Slider (94)
+Image Size
+# Menu - right click on HolonObjt (95-103)
+Cut
+Copy
+Paste
+Delete
+Group
+Ungroup
+Track
+Untrack
+Categories

+ 119 - 0
res/Texts/DE.lang

@@ -0,0 +1,119 @@
+# ToolBar (0-16)
+Datei
+Neu
+Öffnen
+Speichern
+Bearbeiten
+Rückgängig
+Wiederherstellen
+Suchen/Ersetzen
+Gezeigte Informationen Ersetzen
+Optionen
+Kategorien Zurücksetzen
+Ansicht
+Ansichtsgröße
+Hilfe
+Über Uns
+Kanten Bearbeiten
+Sprache
+# Tables (17-24)
+Objekt
+Nr.
+Geräte
+Energie
+Quantität
+Aktiviert
+Feld
+Information
+#Graph (25-26)
+Nichts 
+Zurücksetzen
+#Warning PopUps(27-30)
+Warnung
+Möchten Sie ihre aktuellen Daten speichern?
+Möchten Sie wirklich die Kategorie löschen 
+Bitte wählen Sie eine Kategorie oder ein Objekt um etwas löschen zu können.
+#Edit Edges Pop Up (31-34)
+Gezeigte Informationen Ersetzen
+Gesamtenergie von Objekten zeigen
+Verbindungseigenschaften zeigen
+Abbrechen
+# Search/Replace Pop Up (35-45)
+Objekte suchen
+Suchen
+Ersetzen
+Richtung
+Vorwärts
+Rückwerts
+Scope
+Alle
+Einzeln
+Alle Ersetzen
+Schließen
+# Edit Edges Pop Up (46-55)
+Kapazitäten von Kanten bearbeiten
+Max. Kapazität:
+Nur für alle existierenden Kanten ändern
+Nur für neu erstellte Kanten ändern
+Für alle existierenden und neuen Kanten ändern
+Abbrechen
+Bitte wählen Sie eine der Optionen
+Bitte geben Sie eine Zahl größer-gleich 0 im Feld für Maximale Kapazität ein
+Kapazitäten von Kanten bearbeiten
+(geben Sie \"infinite\" für unbeschränkte Kapazitäten ein)
+# Add PopUp Tree (56-63)
+Bitte geben Sie einen Namen für die Kategorie ein 
+Bitte wählen Sie eine Kategorie vor dem hinzufügen 
+Objekt Hinzufügen Menü
+Name:
+Bilder durchsuchen
+Element hinzufügen
+Element löschen
+Abbrechen
+#Add PopUp Element (64-71)
+Element zu Objekt hinzufügen
+Element Name:
+Bereitgestellte Energie:
+Menge:
+Bitte geben Sie Nummern in den Feldern für Menge und Energie ein
+Kein Name
+Name bereits vergeben
+Abbrechen
+# Info for PropertyTable (72-82)
+Name
+Gesamte Energie
+Manuell
+Aktive
+ ist verbunden mit
+ mit ID: 
+ Kante: 
+ nach 
+aktueller Fluss
+Max. Kapazität
+Status
+# Info SimulationMenu (83-87)
+Simulieren
+Simulationsgeschwindigkeit:
+Algorithmus:
+nichts ausgewählt
+Erfolg
+# Exit Pop Up (88)
+Sind Sie sich sicher, dass Sie das Programm beenden wollen?
+# Simulation ToolTip (89-93)
+Abspielen
+Zurücksetzen
+Vorwärts
+Rückwärts
+Zeitschieber
+# Image Size Slider (94)
+Bildgröße
+#Menu - right click on HolonObjt (95-102)
+Cut
+Copy
+Paste
+Delete
+Group
+Ungroup
+Track
+Untrack
+Categories

+ 120 - 0
res/Texts/ES.lang

@@ -0,0 +1,120 @@
+#ToolBar (0-16)
+Archivo
+Nuevo
+Abrir
+Guardar
+Editar
+Deshacer
+Rehacer
+Buscar/Reemplazar
+Editar Información a mostrar
+Opciones
+Resetear Categorias
+Vista
+Tamaño de Vista
+Ayuda
+Sobre Nosotros
+Editar Conexiones
+Idiomas
+#Tables (17-24)
+Objeto
+Nr.
+Equipo
+Enegia
+Cantidad
+Activo
+Campo
+Información
+#Graph (25-26)
+Vacio 
+Resetear
+#Warning PopUps(27-30)
+Atención
+Desea guardar su progreso?"
+Esta seguro que quiere eliminar la categoría 
+Por favor, seleccione una categoria o un objecto para poder proceder a eliminarlo.
+#Edit Edges Pop Up (31-34)
+Editar información a mostrar
+Mostrar energia total de los objetos
+Mostrar propiedades de las conexiones
+Cancelar
+#Search/Replace Pop Up (35-45)
+Buscar Objetos
+Buscar
+Reemplazar
+Dirección
+Adelante
+Atrás
+Alcance
+Todo
+Uno
+Reemplazar Todo
+Cerrar
+#Edit Edges Pop Up (46-55)
+Editar Capacidad de las Conexiones
+Capacidad Max.:
+Cambiar para todas las conexiones existentes
+Cambiar solo para conexiones nuevas
+Cambiar para todas las conexiones existentes y nuevas
+Cancelar
+Por favor, elija una de las opciones
+Por favor, ingrese un valor mayor o igual a 0 en el campo de Capacidad Max.
+Editar capacidad de las conexiones
+(ingresar \"infinite\" para capacidad infinita)
+#Add PopUp Tree (56-63)
+Por favor, ingrese el nombre de la categoria 
+Por favor, elija una categoria antes de agregar 
+Menu para Agregar un Objeto
+Nombre:
+Buscar Imagen
+Agregar Elemento
+Eliminar Elemento
+Cancelar
+#Add PopUp Element (64-71)
+Agregar Elemento al Objecto
+Nombre del El.:
+Energía:
+Cantidad:
+Por favor, ingrese valores en los campos de cantidad y energía
+Sin nombre
+Nombre en uso
+Cancelar
+#Info for PropertyTable (72-82)
+Nombre
+Energia Total
+Manual
+Activo
+esta conectado a 
+ con ID: 
+Canto: 
+ a 
+Corriente actual
+Capacidad Max.
+Estado
+#Info SimulationMenu (83-87)
+Simular
+Velocidad de Simulación:
+Algoritmo:
+nada seleccionado
+exito
+#Exit Pop Up (88)
+Esta seguro que quiere cerrar el programa?
+#Simulation ToolTip (89-93)
+Iniciar
+Resetear
+Adelante
+Atrás
+Linea de Tiempo
+#Image Size Slider (94)
+Tamaño de la Imagen
+#Menu - right click on HolonObjt (95-103)
+Cortar
+Copiar
+Pegar
+Eliminar
+Agrupar
+Desagrupar
+Rastrear
+Dejar de rastrear
+#missing categories???
+Categories 

+ 119 - 0
res/Texts/ZH.lang

@@ -0,0 +1,119 @@
+# ToolBar (0-16)
+文档
+新
+打开
+保存
+编辑
+撤销
+重做
+查找/替换
+编辑显示的信息
+选项
+复位类别
+视图
+视图尺寸
+帮助
+关于我们
+编辑边缘
+语言
+# Tables (17-24)
+对象
+No.
+能源
+电能
+数量
+激活
+字段
+信息
+# Graph (25-26)
+无
+重置
+# Warning PopUps(27-30)
+警告
+需要储存现在的数据吗?
+真的想删除类别吗?
+请选择一个类别或对象以便删除。
+#Edit Edges Pop Up (31-34)
+编辑显示的信息
+显示这个对象的总能源
+显示这个对象的总能源
+取消
+# Search/Replace Pop Up (35-45)
+搜索对象
+寻找
+重置
+方向
+前进
+后退
+范围
+全选
+单一
+重置全部
+关闭
+# Edit Edges Pop Up (46-55)
+编辑边缘容量
+最大容量:
+更改现有全部编辑
+更改更新内容部分编辑
+更改现有全部以及更新内容部分编辑
+取消
+请选择一个选项
+请输入一个数字大于或等于在字段为最大容量
+编辑边缘容量
+(进入 \"无限\" 无限产能)
+# Add PopUp Tree (56-63)
+请输入类别名称 
+请在添加之前选定一个类别 
+添加对象菜单
+名称:
+浏览图片
+添加元素
+删除元素
+取消
+# Add PopUp Element (64-71)
+添加元素至对象
+元素名称:
+提供能源:
+数量:
+请在字段中输入数量以及假设能源数字
+无名
+已给出的名称
+取消
+# Info for PropertyTable (72-82)
+名称
+总能量
+手册
+主动
+ 链接至
+ 通过ID: 
+边缘: 
+ 至 
+电流流
+最大容量
+状态
+# Info SimulationMenu (83-87)
+模拟
+仿真速度:
+计算程序:
+选择“文件夹
+成功
+# Exit Pop Up (88)
+您确定想要退出?
+# Simulation ToolTip (89-93)
+播放
+复位
+前进
+后退
+时间滑块
+# Image Size Slider (94)
+图片尺寸
+# Menu - right click on HolonObjt (95-103)
+Cut
+Copy
+Paste
+Delete
+Group
+Ungroup
+Track
+Untrack
+Categories

+ 143 - 236
src/ui/view/Languages.java

@@ -1,236 +1,143 @@
-package ui.view;
-
-public class Languages {
-
-	static int languageVar = 0;
-
-	static String[] arrayEN = {
-			// ToolBar (0-16)
-			"File", "New", "Open", "Save", "Edit", "Undo", "Redo", "Find/Replace", "Edit showed Information", "Options",
-			"Reset Categories", "View", "View Size", "Help", "About Us", "Edit Edges", "Language",
-			// Tables (17-24)
-			"Object", "Nr.", "Device", "Energy", "Quantity", "Activated", "Field", "Information",
-			// Graph (25-26)
-			"None ", "Reset",
-			// Warning PopUps (27-30)
-			"Warning", "Do you want to save your current data?", "Do you really want to delete the Category ",
-			"Please select a Category or an Object in order to delete something.",
-			// Edit Edges Pop Up (31-34)
-			"Edit Showed Informations", "Show Total Energy of Objects", "Show Connection Properties", "Cancel",
-			// Search/Replace Pop Up (35-45)
-			"Search for Objects", "Find", "Replace", "Direction", "Forward", "Backward", "Scope", "All", "Single",
-			"Replace All", "Close",
-			// Edit Edges Pop Up (46-55)
-			"Edit Capacities of Edges", "Maximum Capacity:", "Change for all existing Edges only",
-			"Change for new created Edges only", "Change for all existing and new created Edges", "Cancel",
-			"Please select one of the options",
-			"Please enter a number greater or equal 0 in the Field for Maximum Capacity", "Edit Edge Capacities",
-			"(enter \"infinite\" for infinite Capacity)",
-			// Add PopUp Tree (56-63)
-			"Please enter a Name for Category ", "Please select a Category first before adding ", "Add Object Menu",
-			"Name:", "Browse Image", "Add Element", "Delete Element", "Cancel",
-			// Add PopUp Element (64-71)
-			"Add Element to Object", "Element Name:", "Provided Energy:", "Amount:",
-			"Please enter numbers in the Fields amount and Energy", "No name", "Name already given", "Cancel",
-			// Info for PropertyTable (72-82)
-			"Name", "Total Energy", "Manual", "Active", " is connected to", " with ID: ", "Edge: ", " to ",
-			"Current flow", "Max. Capacity", "Status",
-			// Info SimulationMenu (83-87)
-			"Simulate", "Simulation Speed:", "Algorithm:", "non selected", "success",
-			// Exit Pop Up (88)
-			"Are you sure you want to exit?",
-			// Simulation ToolTip (89-93)
-			"Play", "Reset", "Forward", "Backward", "Time Slider",
-			// Image Size Slider (94)
-			"Image Size",
-			// Menu - right click on HolonObjt (95-102)
-			"Cut", "Copy", "Paste", "Delete", "Group", "Ungroup", "Track", "Untrack"};
-
-	static String[] arrayES = {
-			// ToolBar (0-16)
-			"Archivo", "Nuevo", "Abrir", "Guardar", "Editar", "Deshacer", "Rehacer", "Buscar/Reemplazar",
-			"Editar Información a mostrar", "Opciones", "Resetear Categorias", "Vista", "Tamaño de Vista", "Ayuda",
-			"Sobre Nosotros", "Editar Conexiones", "Idiomas",
-			// Tables (17-24)
-			"Objeto", "Nr.", "Equipo", "Enegia", "Cantidad", "Activo", "Campo", "Información",
-			// Graph (25-26)
-			"Vacio ", "Resetear",
-			// Warning PopUps(27-30)
-			"Atención", "Desea guardar su progreso?", "Esta seguro que quiere eliminar la categoría ",
-			"Por favor, seleccione una categoria o un objecto para poder proceder a eliminarlo.",
-			// Edit Edges Pop Up (31-34)
-			"Editar información a mostrar", "Mostrar energia total de los objetos",
-			"Mostrar propiedades de las conexiones", "Cancelar",
-			// Search/Replace Pop Up (35-45)
-			"Buscar Objetos", "Buscar", "Reemplazar", "Dirección", "Adelante", "Atrás", "Alcance", "Todo", "Uno",
-			"Reemplazar Todo", "Cerrar",
-			// Edit Edges Pop Up (46-55)
-			"Editar Capacidad de las Conexiones", "Capacidad Max.:", "Cambiar para todas las conexiones existentes",
-			"Cambiar solo para conexiones nuevas", "Cambiar para todas las conexiones existentes y nuevas", "Cancelar",
-			"Por favor, elija una de las opciones",
-			"Por favor, ingrese un valor mayor o igual a 0 en el campo de Capacidad Max.",
-			"Editar capacidad de las conexiones", "(ingresar \"infinite\" para capacidad infinita)",
-			// Add PopUp Tree (56-63)
-			"Por favor, ingrese el nombre de la categoria ", "Por favor, elija una categoria antes de agregar ",
-			"Menu para Agregar un Objeto", "Nombre:", "Buscar Imagen", "Agregar Elemento", "Eliminar Elemento",
-			"Cancelar",
-			// Add PopUp Element (64-71)
-			"Agregar Elemento al Objecto", "Nombre del El.:", "Energía:", "Cantidad:",
-			"Por favor, ingrese valores en los campos de cantidad y energía", "Sin nombre", "Nombre en uso", "Cancelar",
-			// Info for PropertyTable (72-82)
-			"Nombre", "Energia Total", "Manual", "Activo", " esta conectado a ", " con ID: ", "Canto: ", " a ",
-			"Corriente actual", "Capacidad Max.", "Estado",
-			// Info SimulationMenu (83-87)
-			"Simular", "Velocidad de Simulación:", "Algoritmo:", "nada seleccionado", "exito",
-			// Exit Pop Up (88)
-			"Esta seguro que quiere cerrar el programa?",
-			// Simulation ToolTip (89-93)
-			"Iniciar", "Resetear", "Adelante", "Atrás", "Linea de Tiempo",
-			// Image Size Slider (94)
-			"Tamaño de la Imagen",
-			// Menu - right click on HolonObjt (95-102)
-			"Cortar", "Copiar", "Pegar", "Eliminar", "Agrupar", "Desagrupar", "Rastrear", "Dejar de rastrear", };
-
-	static String[] arrayDE = {
-			// ToolBar (0-16)
-			"Datei", "Neu", "Öffnen", "Speichern", "Bearbeiten", "Rückgängig", "Wiederherstellen", "Suchen/Ersetzen",
-			"Gezeigte Informationen Ersetzen", "Optionen", "Kategorien Zurücksetzen", "Ansicht", "Ansichtsgröße",
-			"Hilfe", "Über Uns", "Kanten Bearbeiten", "Sprache",
-			// Tables (17-24)
-			"Objekt", "Nr.", "Geräte", "Energie", "Quantität", "Aktiviert", "Feld", "Information",
-			// Graph (25-26)
-			"Nichts ", "Zurücksetzen",
-			// Warning PopUps(27-30)
-			"Warnung", "Möchten Sie ihre aktuellen Daten speichern?", "Möchten Sie wirklich die Kategorie löschen ",
-			"Bitte wählen Sie eine Kategorie oder ein Objekt um etwas löschen zu können.",
-			// Edit Edges Pop Up (31-34)
-			"Gezeigte Informationen Ersetzen", "Gesamtenergie von Objekten zeigen", "Verbindungseigenschaften zeigen",
-			"Abbrechen",
-			// Search/Replace Pop Up (35-45)
-			"Objekte suchen", "Suchen", "Ersetzen", "Richtung", "Vorwärts", "Rückwerts", "Scope", "Alle", "Einzeln",
-			"Alle Ersetzen", "Schließen",
-			// Edit Edges Pop Up (46-55)
-			"Kapazitäten von Kanten bearbeiten", "Max. Kapazität:", "Nur für alle existierenden Kanten ändern",
-			"Nur für neu erstellte Kanten ändern", "Für alle existierenden und neuen Kanten ändern", "Abbrechen",
-			"Bitte wählen Sie eine der Optionen",
-			"Bitte geben Sie eine Zahl größer-gleich 0 im Feld für Maximale Kapazität ein",
-			"Kapazitäten von Kanten bearbeiten", "(geben Sie \"infinite\" für unbeschränkte Kapazitäten ein)",
-			// Add PopUp Tree (56-63)
-			"Bitte geben Sie einen Namen für die Kategorie ein ", "Bitte wählen Sie eine Kategorie vor dem hinzufügen ",
-			"Objekt Hinzufügen Menü", "Name:", "Bilder durchsuchen", "Element hinzufügen", "Element löschen",
-			"Abbrechen",
-			// Add PopUp Element (64-71)
-			"Element zu Objekt hinzufügen", "Element Name:", "Bereitgestellte Energie:", "Menge:",
-			"Bitte geben Sie Nummern in den Feldern für Menge und Energie ein", "Kein Name", "Name bereits vergeben",
-			"Abbrechen",
-			// Info for PropertyTable (72-82)
-			"Name", "Gesamte Energie", "Manuell", "Aktive", " ist verbunden mit", " mit ID: ", "Kante: ", " nach ",
-			"aktueller Fluss", "Max. Kapazität", "Status",
-			// Info SimulationMenu (83-87)
-			"Simulieren", "Simulationsgeschwindigkeit:", "Algorithmus:", "nichts ausgewählt", "Erfolg",
-			// Exit Pop Up (88)
-			"Sind Sie sich sicher, dass Sie das Programm beenden wollen?",
-			// Simulation ToolTip (89-93)
-			"Abspielen", "Zurücksetzen", "Vorwärts", "Rückwärts", "Zeitschieber",
-			// Image Size Slider (94)
-			"Bildgröße",
-			// Menu - right click on HolonObjt (95-102)
-			"Cut", "Copy", "Paste", "Delete", "Group", "Ungroup", "Track", "Untrack", "Categories" };
-
-	static String[] arrayCZ = {
-			// ToolBar (0-16)
-			"File", "New", "Open", "Save", "Edit", "Undo", "Redo", "Find/Replace", "Edit showed Information", "Options",
-			"Reset Categories", "View", "View Size", "Help", "About Us", "Edit Edges", "Language",
-			// Tables (17-24)
-			"Object", "Nr.", "Device", "Energy", "Quantity", "Activated", "Field", "Information",
-			// Graph (25-26)
-			"None ", "Reset",
-			// Warning PopUps(27-30)
-			"Warning", "Do you want to save your current data?", "Do you really want to delete the Category ",
-			"Please select a Category or an Object in order to delete something.",
-			// Edit Edges Pop Up (31-34)
-			"Edit Showed Informations", "Show Total Energy of Objects", "Show Connection Properties", "Cancel",
-			// Search/Replace Pop Up (35-45)
-			"Search for Objects", "Find", "Replace", "Direction", "Forward", "Backward", "Scope", "All", "Single",
-			"Replace All", "Close",
-			// Edit Edges Pop Up (46-55)
-			"Edit Capacities of Edges", "Maximum Capacity:", "Change for all existing Edges only",
-			"Change for new created Edges only", "Change for all existing and new created Edges", "Cancel",
-			"Please select one of the options",
-			"Please enter a number greater or equal 0 in the Field for Maximum Capacity", "Edit Edge Capacities",
-			"(enter \"infinite\" for infinite Capacity)",
-			// Add PopUp Tree (56-63)
-			"Please enter a Name for Category ", "Please select a Category first before adding ", "Add Object Menu",
-			"Name:", "Browse Image", "Add Element", "Delete Element", "Cancel",
-			// Add PopUp Element (64-71)
-			"Add Element to Object", "Element Name:", "Provided Energy:", "Amount:",
-			"Please enter numbers in the Fields amount and providedEnergy", "No name", "Name already given", "Cancel",
-			// Info for PropertyTable (72-82)
-			"Name", "Total Energy", "Manual", "Active", " is connected to", " with ID: ", "Edge: ", " to ",
-			"Current flow", "Max. Capacity", "Status",
-			// Info SimulationMenu (83-87)
-			"Simulate", "Simulation Speed:", "Algorithm:", "choose folder", "success",
-			// Exit Pop Up (88)
-			"Are you sure you want to exit?",
-			// Simulation ToolTip (89-93)
-			"Play", "Reset", "Forward", "Backward", "Time Slider",
-			// Image Size Slider (94)
-			"Image Size",
-			// Menu - right click on HolonObjt (95-102)
-			"Cut", "Copy", "Paste", "Delete", "Group", "Ungroup", "Track", "Untrack", "Categories" };
-
-	static String[] arrayZH = {
-			// ToolBar (0-16)
-			"文档", "新", "打开", "保存", "编辑", "撤销", "重做", "查找/替换", "编辑显示的信息", "选项", "复位类别", "视图", "视图尺寸", "帮助", "关于我们",
-			"编辑边缘", "语言",
-			// Tables (17-24)
-			"对象", "No.", "能源", "电能", "数量", "激活", "字段", "信息",
-			// Graph (25-26)
-			"无", "重置",
-			// Warning PopUps(27-30)
-			"警告", "需要储存现在的数据吗?", "真的想删除类别吗?", "请选择一个类别或对象以便删除。",
-			// Edit Edges Pop Up (31-34)
-			"编辑显示的信息", "显示这个对象的总能源", "显示这个对象的总能源", "取消",
-			// Search/Replace Pop Up (35-45)
-			"搜索对象", "寻找", "重置", "方向", "前进", "后退", "范围", "全选", "单一", "重置全部", "关闭",
-			// Edit Edges Pop Up (46-55)
-			"编辑边缘容量", "最大容量:", "更改现有全部编辑", "更改更新内容部分编辑", "更改现有全部以及更新内容部分编辑", "取消", "请选择一个选项", "请输入一个数字大于或等于在字段为最大容量",
-			"编辑边缘容量", "(进入 \"无限\" 无限产能)",
-			// Add PopUp Tree (56-63)
-			"请输入类别名称 ", "请在添加之前选定一个类别 ", "添加对象菜单", "名称:", "浏览图片", "添加元素", "删除元素", "取消",
-			// Add PopUp Element (64-71)
-			"添加元素至对象", "元素名称:", "提供能源:", "数量:", "请在字段中输入数量以及假设能源数字", "无名", "已给出的名称", "取消",
-			// Info for PropertyTable (72-82)
-			"名称", "总能量", "手册", "主动", " 链接至", " 通过ID: ", "边缘: ", " 至 ", "电流流", "最大容量", "状态",
-			// Info SimulationMenu (83-87)
-			"模拟", "仿真速度:", "计算程序:", "选择“文件夹", "成功",
-			// Exit Pop Up (88)
-			"您确定想要退出?",
-			// Simulation ToolTip (89-93)
-			"播放", "复位", "前进", "后退", "时间滑块",
-			// Image Size Slider (94)
-			"图片尺寸",
-			// Menu - right click on HolonObjt (95-102)
-			"Cut", "Copy", "Paste", "Delete", "Group", "Ungroup", "Track", "Untrack", "Categories" };
-
-	public static String[] getLanguage() {
-		switch (languageVar) {
-		case 0:
-			return arrayEN;
-		case 1:
-			return arrayES;
-		case 2:
-			return arrayDE;
-		case 3:
-			return arrayCZ;
-		case 4:
-			return arrayZH;
-		default:
-			return arrayEN;
-		}
-	}
-
-	public static void setLanguage(int i) {
-		languageVar = i;
-	}
-}
+package ui.view;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class Languages {
+
+	static int languageVar = 0;
+
+	// Language Array Positions:
+	// ToolBar (0-16)
+	// Tables (17-24)
+	// Graph (25-26)
+	// Warning PopUps (27-30)
+	// Edit Edges Pop Up (31-34)
+	// Search/Replace Pop Up (35-45)
+	// Edit Edges Pop Up (46-55)
+	// Add PopUp Tree (56-63)
+	// Add PopUp Element (64-71)
+	// Info for PropertyTable (72-82)
+	// Info SimulationMenu (83-87)
+	// Exit Pop Up (88)
+	// Simulation ToolTip (89-93)
+	// Image Size Slider (94)
+	// Menu - right click on HolonObjt (95-103)
+	// to add more: increase languageSize and add them to the arrayEN
+
+	/**
+	 * Number of different Language Array Positions
+	 */
+	private static int languageSize = 104;
+
+	static String[] arrayEN = {
+			// ToolBar (0-16)
+			"File", "New", "Open", "Save", "Edit", "Undo", "Redo", "Find/Replace", "Edit showed Information", "Options",
+			"Reset Categories", "View", "View Size", "Help", "About Us", "Edit Edges", "Language",
+			// Tables (17-24)
+			"Object", "Nr.", "Device", "Energy", "Quantity", "Activated", "Field", "Information",
+			// Graph (25-26)
+			"None ", "Reset",
+			// Warning PopUps (27-30)
+			"Warning", "Do you want to save your current data?", "Do you really want to delete the Category ",
+			"Please select a Category or an Object in order to delete something.",
+			// Edit Edges Pop Up (31-34)
+			"Edit Showed Informations", "Show Total Energy of Objects", "Show Connection Properties", "Cancel",
+			// Search/Replace Pop Up (35-45)
+			"Search for Objects", "Find", "Replace", "Direction", "Forward", "Backward", "Scope", "All", "Single",
+			"Replace All", "Close",
+			// Edit Edges Pop Up (46-55)
+			"Edit Capacities of Edges", "Maximum Capacity:", "Change for all existing Edges only",
+			"Change for new created Edges only", "Change for all existing and new created Edges", "Cancel",
+			"Please select one of the options",
+			"Please enter a number greater or equal 0 in the Field for Maximum Capacity", "Edit Edge Capacities",
+			"(enter \"infinite\" for infinite Capacity)",
+			// Add PopUp Tree (56-63)
+			"Please enter a Name for Category ", "Please select a Category first before adding ", "Add Object Menu",
+			"Name:", "Browse Image", "Add Element", "Delete Element", "Cancel",
+			// Add PopUp Element (64-71)
+			"Add Element to Object", "Element Name:", "Provided Energy:", "Amount:",
+			"Please enter numbers in the Fields amount and Energy", "No name", "Name already given", "Cancel",
+			// Info for PropertyTable (72-82)
+			"Name", "Total Energy", "Manual", "Active", " is connected to", " with ID: ", "Edge: ", " to ",
+			"Current flow", "Max. Capacity", "Status",
+			// Info SimulationMenu (83-87)
+			"Simulate", "Simulation Speed:", "Algorithm:", "non selected", "success",
+			// Exit Pop Up (88)
+			"Are you sure you want to exit?",
+			// Simulation ToolTip (89-93)
+			"Play", "Reset", "Forward", "Backward", "Time Slider",
+			// Image Size Slider (94)
+			"Image Size",
+			// Menu - right click on HolonObjt (95-102)
+			"Cut", "Copy", "Paste", "Delete", "Group", "Ungroup", "Track", "Untrack"};
+
+	static String[] arrayES = readLanguageFile("Texts"+File.separator+"ES.lang"); 
+
+	static String[] arrayDE = readLanguageFile("Texts"+File.separator+"DE.lang"); 
+		
+	static String[] arrayCZ = readLanguageFile("Texts"+File.separator+"CZ.lang"); 
+
+	static String[] arrayZH = readLanguageFile("Texts"+File.separator+"ZH.lang");
+	
+	public static String[] getLanguage() {
+		switch (languageVar) {
+		case 0:
+			return arrayEN;
+		case 1:
+			return arrayES;
+		case 2:
+			return arrayDE;
+		case 3:
+			return arrayCZ;
+		case 4:
+			return arrayZH;
+		default:
+			return arrayEN;
+		}
+	}
+
+	public static void setLanguage(int i) {
+		languageVar = i;
+	}
+	
+	/**
+	 * Reads language file from jar, each line corresponds to
+	 * a position of the {@value #arrayEN}.
+	 * Lines starting with # are ignored as Comments.
+	 * Missing translations will be filled with english text.
+	 * @param path path of the file e.g. "Texts/DE.lang"
+	 * @return Array of translated String as arrayEN 
+	 */
+	private static String[] readLanguageFile(String path){
+		String[] langArr;
+		try {
+			//read File from Jar
+			FileReader reader = new FileReader(new File(Languages.class.getClassLoader().getResource(path).getFile()));
+			BufferedReader br = new BufferedReader(reader);
+			
+			//store Lines in Array
+			int lineNumber = 0;
+			langArr = new String[languageSize];
+			for (String line = br.readLine(); line != null && lineNumber<languageSize; line = br.readLine()) {
+				//store line in Array, # initializes Comments
+				if (line.isEmpty() || line.startsWith("#"))
+					continue;
+				langArr[lineNumber]=line;
+				lineNumber++;
+			}
+			//missing translations? -> english
+			while(lineNumber<languageSize){
+				langArr[lineNumber]=arrayEN[lineNumber];
+				lineNumber++;
+			}
+			reader.close();
+			return langArr;
+		} catch (IOException e) {
+			//default: English
+			return arrayEN;
+		}
+	}
+}