private Language createLanguage( Locale locale, ResourceBundle bundle, String title, String shortTitle,
String keywords, boolean createNow)
{
if (!createNow && !locale.equals(getDefaultLocale()))
{
Language defaultLang = get(getDefaultLocale());
if (defaultLang != null)
{
if (title == null || title.length() < 1)
{
title = defaultLang.getTitle();
}
if (shortTitle == null || shortTitle.length() < 1)
{
shortTitle = defaultLang.getShortTitle();
}
if (keywords == null || keywords.length() < 1)
{
keywords = StringUtils.join(defaultLang.getKeywords(), ",");
}
}
}
LanguageImpl lang = new LanguageImpl(locale, bundle, title, shortTitle, keywords);
return (Language) lang;