My application uses resouce bundles for different languages (I18N).
string.toLowerCase()
Lowercase is used all over the application to combine sentences.
problem: lowerCase is not correct for German nouns.
Resource bundle:
Sentence:
Like you can see: The German language uses capital letters for the nouns.
Code:
sentence = resource_start + number + resource_day.toLowerCase();
What is the best way to differentiate the english and german language?
The best way to do that would be to store full sentences in your resources and use placeholders for the variable parts:
EN
resource_day = This is the {0} day.
day_first = first
DE
resource_day = Dies ist der {0} Tag.
day_first = erste
And use it as
String day_number = "day_first";
MessageFormat.format(RESOURCE_BUNDLE.getString("resource_day"),
RESOURCE_BUNDLE.getString(day_number);