View Javadoc

1   /*
2    *   Magic-Project is a turn based strategy simulator
3    *   Copyright (C) 2003-2007 Fabrice Daugan
4    *
5    *   This program is free software; you can redistribute it and/or modify it 
6    * under the terms of the GNU General Public License as published by the Free 
7    * Software Foundation; either version 2 of the License, or (at your option) any
8    * later version.
9    *
10   *   This program is distributed in the hope that it will be useful, but WITHOUT 
11   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12   * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more 
13   * details.
14   *
15   *   You should have received a copy of the GNU General Public License along  
16   * with this program; if not, write to the Free Software Foundation, Inc., 
17   * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18   */
19  package net.sf.magicproject.ui.i18n;
20  
21  /***
22   * @author <a href="mailto:fabdouglas@users.sourceforge.net">Fabrice Daugan </a>
23   * @since 0.91
24   */
25  public class Language {
26  
27  	/***
28  	 * The Java Locale language name. Like fr, en,...
29  	 */
30  	private final String locale;
31  
32  	/***
33  	 * The language key name.
34  	 */
35  	private final String key;
36  
37  	/***
38  	 * The language display name. Like Francais, English,...
39  	 */
40  	private final String name;
41  
42  	/***
43  	 * Author name of the translation.
44  	 */
45  	private final String author;
46  
47  	/***
48  	 * Additional information about this translation.
49  	 */
50  	private final String moreInfo;
51  
52  	/***
53  	 * The tested version for this translation.
54  	 */
55  	private final String version;
56  
57  	/***
58  	 * Create a new instance of this class.
59  	 * 
60  	 * @param key
61  	 *          The language key name.
62  	 * @param locale
63  	 *          The Java Locale language name. Like fr, en,...
64  	 * @param name
65  	 *          The language display name. Like Francais, English,...
66  	 * @param author
67  	 *          Author name of the translation.
68  	 * @param moreInfo
69  	 *          Additional information about this translation.
70  	 * @param version
71  	 *          The tested version for this translation.
72  	 */
73  	public Language(String key, String locale, String name, String author,
74  			String moreInfo, String version) {
75  		this.key = key;
76  		this.locale = locale;
77  		this.name = name;
78  		this.author = author;
79  		this.moreInfo = moreInfo;
80  		this.version = version;
81  	}
82  
83  	/***
84  	 * Returns author name of the translation.
85  	 * 
86  	 * @return Author name of the translation.
87  	 */
88  	public String getAuthor() {
89  		return this.author;
90  	}
91  
92  	/***
93  	 * Returns additional information about this translation.
94  	 * 
95  	 * @return Additional information about this translation.
96  	 */
97  	public String getMoreInfo() {
98  		return this.moreInfo;
99  	}
100 
101 	/***
102 	 * Returns the Java Locale language name. Like fr, en,...
103 	 * 
104 	 * @return the Java Locale language name. Like fr, en,...
105 	 */
106 	public String getLocale() {
107 		return this.locale;
108 	}
109 
110 	/***
111 	 * Returns the language key name.
112 	 * 
113 	 * @return the language key name.
114 	 */
115 	public String getKey() {
116 		return this.key;
117 	}
118 
119 	/***
120 	 * Returns the language display name. Like Francais, English,...
121 	 * 
122 	 * @return the language display name. Like Francais, English,...
123 	 */
124 	public String getName() {
125 		return this.name;
126 	}
127 
128 	/***
129 	 * Returns the tested version for this translation.
130 	 * 
131 	 * @return the tested version for this translation.
132 	 */
133 	public String getVersion() {
134 		return this.version;
135 	}
136 
137 	@Override
138 	public String toString() {
139 		return getKey();
140 	}
141 }