#include "libiriwrapper.h"
#include <dpl/utils/warp_iri.h>
#include <dpl/utils/mime_type_utils.h>
-//#include <language_subtag_rst_tree.h>
+#include <language_subtag_rst_tree.h>
+#include "wrt-commons/i18n-dao-ro/i18n_dao_read_only.h"
#include <iri.h>
#include <dpl/log/log.h>
if (!m_defaultlocale) {
m_defaultlocale = attribute.value;
NormalizeString(m_defaultlocale);
- /* TODO : should check valid defaultlocale */
- LogDebug("Default Locale Found " << m_defaultlocale);
+ if( I18n::DB::I18nDAOReadOnly::IsValidSubTag
+ (attribute.value, RECORD_TYPE_LANGUAGE)) {
+ LogDebug("Default Locale Found " << m_defaultlocale);
+ } else {
+ LogWarning("Default Locate Is Invalid");
+ }
} else {
LogWarning("Ignoring subsequent default locale");
}