~ubuntu-branches/debian/sid/latexdraw/sid

« back to all changes in this revision

Viewing changes to latexDraw/lang/LaTeXDrawLang.java

  • Committer: Bazaar Package Importer
  • Author(s): Stuart Prescott
  • Date: 2009-07-15 23:35:52 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090715233552-2bblktyf2lmrkyo3
Tags: 2.0.3+1-1
* New upstream release.
* Add additional Recommended packages for new export features.
* Fix typo in long description, with thanks to Kai Weber (Closes: #529195).
* Bump standards to 3.8.2 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        
55
55
        public static final String LANG_DE = "Deutsch";//$NON-NLS-1$
56
56
        
 
57
        public static final String LANG_IT = "Italiano";//$NON-NLS-1$
 
58
        
57
59
        public static final String MISSING_KEY = "missingKey";//$NON-NLS-1$
58
60
        
59
61
        private static String langCurrent = readLang();
68
70
 
69
71
        public static final String TOKEN_LANG_DE = "lang.de";//$NON-NLS-1$
70
72
        
 
73
        public static final String TOKEN_LANG_IT = "lang.it";//$NON-NLS-1$
 
74
        
71
75
        public static final String LANG_DEFAULT = LANG_EN;
72
76
        
73
77
        private static ResourceBundle resourceBundleLaTeXDrawFrame = ResourceBundle.getBundle(
270
274
                        if(userLang.equals("de")) //$NON-NLS-1$
271
275
                                return LaTeXDrawLang.LANG_DE;
272
276
                        
 
277
                        if(userLang.equals("it")) //$NON-NLS-1$
 
278
                                return LaTeXDrawLang.LANG_IT;
 
279
                        
273
280
                        return LaTeXDrawLang.LANG_DEFAULT; 
274
281
                }
275
282
                
298
305
                        if(userLang.equals("de"))//$NON-NLS-1$
299
306
                                return TOKEN_LANG_DE;
300
307
                        
 
308
                        if(userLang.equals("it"))//$NON-NLS-1$
 
309
                                return TOKEN_LANG_IT;
 
310
                        
301
311
                        return TOKEN_LANG_EN;
302
312
                }
303
313
                
312
322
                
313
323
                if(langCurrent.equals(LANG_DE))
314
324
                        return TOKEN_LANG_DE;
 
325
                
 
326
                if(langCurrent.equals(LANG_IT))
 
327
                        return TOKEN_LANG_IT;
315
328
                 
316
329
                return TOKEN_LANG_EN;
317
330
        }
319
332
        
320
333
        
321
334
        /**
322
 
         * @return the langCurrent.
 
335
         * @return the current language.
323
336
         */
324
337
        public static String getlangCurrent()
325
338
        {
329
342
        
330
343
        
331
344
        /**
332
 
         * @param langCurrent2 the langCurrent to set.
 
345
         * @param lang the language to set.
333
346
         */
334
 
        public static void setlangCurrent(String langCurrent2)
 
347
        public static void setlangCurrent(String lang)
335
348
        {
336
 
                if(langCurrent2!=null && (langCurrent2.equals(LANG_DE) || 
337
 
                        langCurrent2.equals(LANG_EN) || langCurrent2.equals(LANG_EN_US) ||
338
 
                        langCurrent2.equals(LANG_ES) || langCurrent2.equals(LANG_FR)))
339
 
                        langCurrent = langCurrent2;
 
349
                if(lang!=null && (lang.equals(LANG_DE) || 
 
350
                        lang.equals(LANG_EN) || lang.equals(LANG_EN_US) ||
 
351
                        lang.equals(LANG_ES) || lang.equals(LANG_FR) || lang.equals(LANG_IT)))
 
352
                        langCurrent = lang;
340
353
        }
341
354
}