public static void DeletePluginLocaleResource(this TemelEklenti plugin,
                                                      ILocalizationService localizationService, ILanguageService languageService,
                                                      string resourceName)
        {
            //actually plugin instance is not required
            if (plugin == null)
            {
                throw new ArgumentNullException(nameof(plugin));
            }
            if (localizationService == null)
            {
                throw new ArgumentNullException(nameof(localizationService));
            }
            if (languageService == null)
            {
                throw new ArgumentNullException(nameof(languageService));
            }

            foreach (var lang in languageService.GetAllLanguages(true))
            {
                var lsr = localizationService.GetLocaleStringResourceByName(resourceName, lang.Id, false);
                if (lsr != null)
                {
                    localizationService.DeleteLocaleStringResource(lsr);
                }
            }
        }
        public static void AddOrUpdatePluginLocaleResource(this TemelEklenti plugin,
                                                           string resourceName, string resourceValue, string languageCulture = null)
        {
            var localizationService = EngineContext.Current.Resolve <ILocalizationService>();
            var languageService     = EngineContext.Current.Resolve <ILanguageService>();

            AddOrUpdatePluginLocaleResource(plugin, localizationService,
                                            languageService, resourceName, resourceValue, languageCulture);
        }
        public static void DeletePluginLocaleResource(this TemelEklenti plugin,
                                                      string resourceName)
        {
            var localizationService = EngineContext.Current.Resolve <ILocalizationService>();
            var languageService     = EngineContext.Current.Resolve <ILanguageService>();

            DeletePluginLocaleResource(plugin, localizationService,
                                       languageService, resourceName);
        }
        public static void AddOrUpdatePluginLocaleResource(this TemelEklenti plugin,
                                                           ILocalizationService localizationService, ILanguageService languageService,
                                                           string resourceName, string resourceValue, string languageCulture = null)
        {
            //actually plugin instance is not required
            if (plugin == null)
            {
                throw new ArgumentNullException(nameof(plugin));
            }
            if (localizationService == null)
            {
                throw new ArgumentNullException(nameof(localizationService));
            }
            if (languageService == null)
            {
                throw new ArgumentNullException(nameof(languageService));
            }

            foreach (var lang in languageService.GetAllLanguages(true))
            {
                if (!string.IsNullOrEmpty(languageCulture) && !languageCulture.Equals(lang.DilKültürü))
                {
                    continue;
                }

                var lsr = localizationService.GetLocaleStringResourceByName(resourceName, lang.Id, false);
                if (lsr == null)
                {
                    lsr = new LocaleStringResource
                    {
                        LanguageId    = lang.Id,
                        ResourceName  = resourceName,
                        ResourceValue = resourceValue
                    };
                    localizationService.InsertLocaleStringResource(lsr);
                }
                else
                {
                    lsr.ResourceValue = resourceValue;
                    localizationService.UpdateLocaleStringResource(lsr);
                }
            }
        }