cocur / slugify

Converts a string to a slug. Includes integrations for Symfony, Silex, Laravel, Zend Framework 2, Twig, Nette and Latte.
MIT License
2.87k stars 251 forks source link

Create korean.json #320

Closed MrMooky closed 1 year ago

MrMooky commented 1 year ago

Building on a closed PR, I created a new one for Korean translation. I had one of my (Korean) customers quickly look over and got "There seems to be no problem with what you sent.".

florianeckerstorfer commented 1 year ago

Thank you so much for the PR. And sorry for the talking so long to merge it.

dpDesignz commented 1 year ago

@florianeckerstorfer Thanks for adding this! I've just started supporting Korean for one of my clients and this has come in super helpful. How can I add this to my project as I see it's not in the release code yet :(

florianeckerstorfer commented 1 year ago

@dpDesignz Released a new version 4.4

dpDesignz commented 1 year ago

@dpDesignz Released a new version 4.4

@florianeckerstorfer Thanks, I've updated to 4.4.0, but I'm still getting a ruleset 'korean' does not exist error. Am I missing a step?

florianeckerstorfer commented 1 year ago

@dpDesignz It is not a default rule, you need to activate it

$slugify->activateRuleSet("korean");
dpDesignz commented 1 year ago

@dpDesignz It is not a default rule, you need to activate it

$slugify->activateRuleSet("korean");

@florianeckerstorfer this is my code which I'm getting the error with

// Get SEO friendly URL
$url = new Slugify();
$url->activateRuleSet('korean');
$url = $url->slugify($string);

It's the $url->activateRuleSet('korean); line that I'm getting the ruleset 'korean' does not exist error on

I see Run php bin/generate-default.php as step 3 for adding a language which I'm not sure has been done? I tried to download the repo to do this myself but I couldn't get it to download the entire repo, it would only download the release for some reason.

dpDesignz commented 1 year ago

Hey @florianeckerstorfer, just following this up please? :) It's still not working for me and I'm not sure where to look to test this.

florianeckerstorfer commented 11 months ago

@dpDesignz Sorry, my bad I didn't generate the default ruleset. Should be fixed in v4.5.0