Skip to content
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

How can I add other lang? #178

Closed
Saruqui opened this issue Aug 16, 2017 · 4 comments
Closed

How can I add other lang? #178

Saruqui opened this issue Aug 16, 2017 · 4 comments

Comments

@Saruqui
Copy link

Saruqui commented Aug 16, 2017

How can I add other languages to use the function .toText() ? I'm not sure what's the best way to do it.

Thanks in advance

@kkostov
Copy link

kkostov commented Aug 28, 2017

I believe toText() takes some extra parameters which can include a custom language definition object.
You can lookup the default ENGLISH object in the source here and I also found an older comment making a note of the usage here e.g. rule.toText(null, gettext, yourlanguageobject)

@dehlen
Copy link

dehlen commented Sep 11, 2017

Hi i am also interested in supporting a different language, however as already stated in #13 this won't work with the current API because grammar differs for other languages. Any chances we might see a reworked API in the future to better support i18n ?

Just came across this issue because i am about to implement something like this for a project i am working on. I might get some time to have a look by myself but if someone already started something like this I'd love to hear about that :)

@wakirin
Copy link

wakirin commented Sep 27, 2017

https://github.com/rlanvin/php-rrule/blob/master/src/i18n/en.php
I think that is implementation better, but need adaptive it

@espen
Copy link
Collaborator

espen commented Jan 16, 2018

Closed in favour of #13

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

5 participants