private async Task <LocalizedUrlHelper> CreateUrlHelperForLanguageSelectorAsync(LanguageModel model, int currentLanguageId)
        {
            // TODO: (mh) (core) Debug & Test once product actions are implemented.
            if (currentLanguageId != model.Id)
            {
                var routeValues    = Request.RouteValues;
                var controllerName = routeValues.GetControllerName();

                if (!routeValues.TryGetValue(controllerName + "id", out var val))
                {
                    controllerName = routeValues.GetActionName();
                    routeValues.TryGetValue(controllerName + "id", out val);
                }

                int entityId = 0;
                if (val != null)
                {
                    entityId = val.Convert <int>();
                }

                if (entityId > 0)
                {
                    var activeSlug = await _urlService.GetActiveSlugAsync(entityId, controllerName, model.Id);

                    if (activeSlug.IsEmpty())
                    {
                        // Fallback to default value.
                        activeSlug = await _urlService.GetActiveSlugAsync(entityId, controllerName, 0);
                    }

                    if (activeSlug.HasValue())
                    {
                        var helper = new LocalizedUrlHelper(Request.PathBase, activeSlug);
                        return(helper);
                    }
                }
            }

            return(new LocalizedUrlHelper(Request));
        }