Question: I have a lot of text processing scripts to apply on a lot of text files. I am writing a batch script (on Win 7) to start them and to iterate through the directories and subdirectories containing the text files. Actually, I am wondering if there is a preferable way of iterating more often or executing more processes during one iteration regarding efficieny:

**Variant A**

```
for x in y
process 1 on x
process 2 on x 
process 3 on x

```

or **Variant B**

```
for x in y
process 1 on x

for x in y
process 2 on x

for x in y
process 3 on x

```

Thank you in advance!

Answer: 
Just make like this, you need to have a properties file in each language and reload it on ResourceBundle.

```
package test;
Test.java
bundle_de.properties
bundle_en.properties

```

The main code.

```
package test;

import java.util.Locale;
import java.util.ResourceBundle;

public class Test {

    public static void main(String[] args) {
        ResourceBundle rb = ResourceBundle.getBundle("test.bundle", Locale.ENGLISH);
        System.out.println(rb.getString("wololo"));

        rb = ResourceBundle.getBundle("test.bundle", Locale.GERMAN);
        System.out.println(rb.getString("wololo"));
    }

}

```

Console output:

```
 Wololo in english
 Wololo in german

```
You need to use resource bundles for localization. Read this [tutorial](http://docs.oracle.com/javase/tutorial/i18n/resbundle/index.html) end to end