Skip to content

TranslitUrl class doesn't check the current locale #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jasperzeinstra opened this issue May 19, 2021 · 3 comments
Open

TranslitUrl class doesn't check the current locale #2

jasperzeinstra opened this issue May 19, 2021 · 3 comments

Comments

@jasperzeinstra
Copy link

Cool module, but the TranslitUrl class doesn't check the locale. For other languages then DE you want "ö" to be transformed to "o"

@avstudnitz
Copy link
Contributor

True, the module doesn't support that (yet). I could think of a configuration switch where you could turn on or off the feature on a store view base - on the other hand, I am not sure if the frontend store is even set when generating URLs, so it could be difficult to retrieve the context.

@jasperzeinstra
Copy link
Author

I think it's best to get the current store. Then check that locale. If it's Geman then replace/add the $convertTable. So adding something to the _construct function to check the current scope.

public function __construct(
    \Magento\Framework\App\Config\ScopeConfigInterface $config
    \Magento\Store\Model\StoreManagerInterface $storeManager
)
{
    $this->storeManager = $storeManager;
    parent::__construct($config);
}

When I have time I will check if this works.

@Crissov
Copy link

Crissov commented Jul 26, 2023

I wanted to leave a brief comment about CLDR/ICU data, but this quickly became a rabbit hole I went down, and in the end I wrote a bug report to Magento instead: magento/magento2#37802

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants