package com.alexrnl.subtitlecorrector.service;

import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;

import com.alexrnl.subtitlecorrector.io.Dictionary;

/**
 * Class in charge of managing the dictionary used while correcting the subtitles.
 * @author Alex
 */
public class DictionaryManager {
	/** Logger */
	private static Logger	lg	= Logger.getLogger(DictionaryManager.class.getName());
	
	/** Map with the dictionaries */
	private final Map<String, Dictionary> dictionaries;
	
	/**
	 * Constructor #1.<br />
	 */
	public DictionaryManager () {
		super();
		this.dictionaries = new HashMap<>();
	}
}

@@ -57,20 +57,134 @@
 ava.
-util.HashMap
+io.IOException;%0Aimport java.nio.charset.Charset;%0Aimport java.nio.file.Files;%0Aimport java.util.HashMap;%0Aimport java.util.Locale
 ;%0Aim
@@ -559,184 +559,669 @@
 onar
-ies */%0A%09private final Map%3CString, Dictionary%3E dictionaries;%0A%09%0A%09/**%0A%09 * Constructor #1.%3Cbr /%3E%0A%09 */%0A%09public DictionaryManager () %7B%0A%09%09super();%0A%09%09this.dictionaries = new HashMap%3C%3E(
+y for each locale */%0A%09private final Map%3CLocale, Dictionary%3E%09localeDictionaries;%0A%09/** Map with the custom dictionaries of the user */%0A%09private final Map%3CString, Dictionary%3E%09customDictionaries;%0A%09/** The dictionary of the current session */%0A%09private final Dictionary%09%09%09%09sessionDictionary;%0A%09%0A%09/**%0A%09 * Constructor #1.%3Cbr /%3E%0A%09 * @throws IOException%0A%09 *         if a dictionary could not be created.%0A%09 */%0A%09public DictionaryManager () throws IOException %7B%0A%09%09super();%0A%09%09localeDictionaries = new HashMap%3C%3E();%0A%09%09customDictionaries = new HashMap%3C%3E();%0A%09%09sessionDictionary = new Dictionary(Files.createTempFile(%22sessionDictionary%22, %22.txt%22),%0A%09%09%09%09Charset.defaultCharset(), true
 );%0A%09

Add different kind of dictionaries in the DictionaryManager