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

added Slovak translation but :count is more complicated in my language #27

Closed
wants to merge 2 commits into from

Conversation

olso
Copy link

@olso olso commented Jul 5, 2014

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) when pulling dc62e40 on olso:master into 8566620 on jenssegers:master.

@jenssegers
Copy link
Owner

More complicated in what way?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) when pulling 3f4c4cf on olso:master into 8566620 on jenssegers:master.

@olso
Copy link
Author

olso commented Jul 5, 2014

@jenssegers

let's say that

'minute' => '1 minúta|:count minutes',

would become

'minute' => '1 minúta|:count minúty',

but if I were to use it with

'before' => ':time before',

'minute' would have to be minútami while counted

@jenssegers
Copy link
Owner

Could you translated the plural forms in the meanwhile? I will try to figure something out on how we could solve this (but it doesn't look that easy).

@jenssegers
Copy link
Owner

One way to tackle this is if we would add additional language lines containing a suffix, like:

'minute_before' => '...',

These would be optional and would get a higher priority when used with ago and before.

@jenssegers
Copy link
Owner

German also had this problem, and I updated the code to allow for translations in combination with specific suffixes. Check out the german language file: https://github.com/jenssegers/laravel-date/blob/master/src/lang/de/date.php

Could you update the Slovak file like that?

@jenssegers
Copy link
Owner

@olso Can you see if you can fix the Slovak translation file?

@piotr-cz
Copy link

piotr-cz commented Nov 1, 2014

It's the same pattern for Czech, Polish and probably all Slavic languages

@estankovic
Copy link
Contributor

what about adding custom behavior for specific languages (for example javascript library Moment.js )

@jenssegers
Copy link
Owner

How would you implement this?

@danhunsaker
Copy link

For reference, there is a pseudo-port of moment.js to PHP at fightbulc/moment.php - consulting its code may illuminate what @CylonSK is thinking, here, which at a cursory glance seems to indicate supporting Closures as well as strings in language files.

@olso olso closed this Oct 16, 2018
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

Successfully merging this pull request may close these issues.

None yet

6 participants