i18n-api/src/main/java/com/blackypaw/mc/i18n/PropertyTranslationStorage.java
/**
	 * Loads a language from a pre-loaded properties set.
	 *
	 * @param locale The locale of the language
	 * @param properties The properties to load all translation keys from
	 *
	 * @throws IOException Thrown in case the language could not be loaded
	 */
Loads a language from a pre-loaded properties set.
@param locale The locale of the language
@param properties The properties to load all translation keys from

@throws IOException Thrown in case the language could not be loaded
Loads a language from a pre - loaded properties set . @param locale The locale of the language @param properties The properties to load all translation keys from @throws IOException Thrown in case the language could not be loaded
public void loadLanguage( Locale locale, Properties properties ) throws IOException {
		Map<Integer, String> translation = new HashMap<>();
		Enumeration e = properties.propertyNames();
		while ( e.hasMoreElements() ) {
			String propertyName = (String) e.nextElement();
			int hash = FNVHash.hash1a32( propertyName );
			if ( translation.containsKey( hash ) ) {
				throw new IOException( "Colliding hash codes for distinct translation keys: '" + propertyName + "'" );
			}
			translation.put( hash, properties.getProperty( propertyName ) );
		}
		this.translations.put( locale, translation );
	}
public void loadLanguage ( Locale locale , Properties properties ) throws IOException { Map < Integer , String > translation = new HashMap < > ( ) ; Enumeration e = properties . propertyNames ( ) ; while ( e . hasMoreElements ( ) ) { String propertyName = ( String ) e . nextElement ( ) ; int hash = FNVHash . hash1a32 ( propertyName ) ; if ( translation . containsKey ( hash ) ) { throw new IOException ( "Colliding hash codes for distinct translation keys: '" + propertyName + "'" ) ; } translation . put ( hash , properties . getProperty ( propertyName ) ) ; } this . translations . put ( locale , translation ) ; }
Loads a language from a pre-loaded properties set.
Loads a language from a pre - loaded properties set .