friendly-challenge icon indicating copy to clipboard operation
friendly-challenge copied to clipboard

Correct language support

Open jonyking opened this issue 1 year ago • 1 comments
trafficstars

Hello,

it would be great when you support the correct language codes. It would be great if the plugin can handle regular RFC 1766 standard.

For example:

Actually german is "de" but it should be "de-DE" to support all standards.

jonyking avatar Jan 31 '24 08:01 jonyking

Hey, I believe right now we use the two letter language codes from the ISO 639 standard internally.

You can actually already pass in RFC 1766 langauge codes and friendly-challenge will just strip away anything after the - which convertes de-DE to de. See https://github.com/FriendlyCaptcha/friendly-challenge/blob/master/src/captcha.ts#L141

I agree that this is not a great solution and will even result in a type error when using TypeScript. Maybe we can adjust the typings to allow for RFC 1766 language codes? Completely changing the language code standard now would be a rather big breaking change.

merlinfuchs avatar Feb 01 '24 09:02 merlinfuchs

@merlinfuchs this change hasn't been released yet and it's been a short while. Would it be possible to create a new release some time soon?

julianwachholz avatar Mar 23 '24 15:03 julianwachholz

I apologize for the long delay, I'll mint a new release today :)

gzuidhof avatar Mar 26 '24 10:03 gzuidhof

0.9.15 is now live, which should do the job for this issue.

gzuidhof avatar Mar 26 '24 10:03 gzuidhof