struct UILocRecord
{
	var m_tag : CName;
	var m_value : String;
}

class UILocalizationMap
{
	private var m_map : array< UILocRecord >;

	public function Init()
	{
		m_map.Clear();
		AddRecord( 'E3_DPS_UI', "DPS" );
		AddRecord( 'E3_Penetration_UI', "PNT" );
		AddRecord( 'E3_Accuracy_UI', "ACC" );
		AddRecord( 'E3_RateOfFire_UI', "ROF" );
		AddRecord( 'E3_Recoil_UI', "Recoil" );
		AddRecord( 'E3_Spread_UI', "Spread" );
		AddRecord( 'E3_Range_UI', "Range" );
		AddRecord( 'PhysicalResistance', "Physical resistance" );
		AddRecord( 'ThermalResistance', "Thermal resistance" );
		AddRecord( 'ElectricResistance', "EMP resistance" );
		AddRecord( 'ChemicalResistance', "Chemical resistance" );
		AddRecord( 'Range', "Range" );
	}

	public function AddRecord( tag : CName, const value : ref< String > )
	{
		var record : UILocRecord;
		record.m_tag = tag;
		record.m_value = value;
		m_map.PushBack( record );
	}

	public function Localize( tag : CName ) : String
	{
		var i, count : Int32;
		count = m_map.Size();
		for( i = 0; i < count; i += 1 )
		{
			if( m_map[ i ].m_tag == tag )
			{
				return m_map[ i ].m_value;
			}
		}
		return NameToString( tag );
	}

}

