/// <summary>
        /// Creates a registered language
        /// </summary>
        /// <param name="configuration">The language configuration</param>
        /// <returns>The language created</returns>
        public RegisteredLanguage CreateLanguage
        (
            RegisteredLanguageConfiguration configuration
        )
        {
            EnsureLanguageAvailable(configuration);

            var language = new RegisteredLanguage
                           (
                configuration
                           );

            _languageRepository.AddLanguage(language);
            _unitOfWork.SaveChanges();

            RegisteredPhraseTranslatorFactory.ClearCache();

            return(language);
        }
        /// <summary>
        /// Auto registers the languages specified
        /// </summary>
        /// <param name="configurations">The language configurations</param>
        public void AutoRegisterLanguages
        (
            params RegisteredLanguageConfiguration[] configurations
        )
        {
            Validate.IsNotNull(configurations);

            var changesMade = false;

            foreach (var configuration in configurations)
            {
                var registered = _languageRepository.HasBeenRegistered
                                 (
                    configuration.Iso
                                 );

                if (false == registered)
                {
                    var language = new RegisteredLanguage
                                   (
                        configuration
                                   );

                    _languageRepository.AddLanguage
                    (
                        language
                    );

                    changesMade = true;
                }
            }

            if (changesMade)
            {
                _unitOfWork.SaveChanges();
            }
        }