Read the saved language
()
| 135 | |
| 136 | /** Read the saved language */ |
| 137 | static private String loadLanguage() { |
| 138 | try { |
| 139 | if (prefFile.exists()) { |
| 140 | String[] lines = PApplet.loadStrings(prefFile); |
| 141 | if (lines != null && lines.length > 0) { |
| 142 | String language = lines[0].trim(); |
| 143 | if (language.length() != 0) { |
| 144 | return language; |
| 145 | } |
| 146 | } |
| 147 | System.err.println("Using default language because of a problem while reading " + prefFile); |
| 148 | } |
| 149 | } catch (Exception e) { |
| 150 | e.printStackTrace(); |
| 151 | } |
| 152 | return null; |
| 153 | } |
| 154 | |
| 155 | |
| 156 | /** |
no test coverage detected