1   package au.gov.amsa.ais;
2   
3   import java.util.ResourceBundle;
4   
5   
6   
7   
8   
9   
10  
11  public class Internationalization {
12  
13  	private static final String BUNDLE_NAME = "au.gov.amsa.ais.messages";
14  
15  	private static ResourceBundle bundle = null;
16  
17  	
18  
19  
20  	private Internationalization() {
21  	}
22  
23  	
24  
25  
26  	static void forTestCoverageOnly() {
27  		new Internationalization();
28  	}
29  
30  	
31  
32  
33  
34  
35  	private static synchronized ResourceBundle getBundle() {
36  		if (bundle == null)
37  			bundle = ResourceBundle.getBundle(BUNDLE_NAME);
38  		return bundle;
39  
40  	}
41  
42  	
43  
44  
45  
46  
47  
48  
49  	public static String getString(String key) {
50  
51  		return getBundle().getString(key);
52  
53  	}
54  }