I translate all my site but can not find date strings. Months, days name etc. I also can't find by search a date string on polyglot. No any date string on polyglot.
Date/time format can be changed here in Studio > Polyglot Settings, other than that is generated automatically (using momentjs actually which already has a lot of translations), if you have correct language code for your language it should work. Could you please specify contents of your sys_localization_languages table to check it for you ?
If I understood correctly, he is just trying to translate "ago". I can't find this key either and yet I have already translated it at home. I don't know how anymore.
Hi, tecnizt , you can search keywords: "hooks.defineLocale('ku', " . you will find there some section "relativeTime ","did not translate to your language, you can copy from en hooks, and translate to your language.
Hi, tecnizt , you can search keywords: "hooks.defineLocale('ku', " . you will find there some section "relativeTime ","did not translate to your language,.
you can find relative time in en-gb is:
relativeTime : {
future : 'in %s',
past : '%s ago',
relative time in ku is:
relativeTime : {
future : 'له %s',
past : '%s',
so, just edit the file plugins_public/moment-with-locales.js , find this section:"hooks.defineLocale('ku',, add words like this:
It looks like our version of moment.js library doesn't support Kurdish language, but as I see latest version does have ku.js, which is most probably Kurdish language, we'll update moment.js in the upcoming version, and after you update your site to UNA 11 date/time values should be translated automatically:
I believe you're looking for
_sys_x_days
Good find and realised what about minutes, hours, weeks, months, years?
T
Yes excactly
T
They are missing. I looking for the by searching and looking one by one but cand find.
I don’t think we have weeks, months, years... instead, after a week has passed it becomes date.
https://github.com/unaio/una/wiki/Date-time-handling
T
Thank you very much.
But How can I add this on polyglot? What can I use it
T
I already translated them. But dont find date strings. Months name, "ago", hour, minute etc...
Date/time format can be changed here in Studio > Polyglot Settings, other than that is generated automatically (using momentjs actually which already has a lot of translations), if you have correct language code for your language it should work. Could you please specify contents of your sys_localization_languages table to check it for you ?
T
can you explain more. How to create and install moment.js.
I found this link but not understand how to do. una.io/page/view-discussion?id=2381
You don't need to install anything additionally. Please reply to my previous question for further instructions.
sys_localization_languages can be found in phpMyAdmin in your server, not in Studio.
T
Let me look. Thank you
T
Here it is
If I understood correctly, he is just trying to translate "ago". I can't find this key either and yet I have already translated it at home. I don't know how anymore.
T
Not only "ago". Months name, "minute", "hour", second etc. All date string untranslated now.
hi, this data language are handled by moments.js. you can download the last version and find your language fields. you can find it at plugins_public :
you can study it at:
https://momentjs.com/downloads/moment-with-locales.js
T
Thank you. What do I do with this script?
How can adapt for my problem?
As I see there are Russian, French and English languages are installed on your site, which language doesn't have time, dates, etc not translated ?
Actually, that was me with three languages. I checked with mine and they are already auto-translate when I change languages as it should be!
tecnizt only has two (English and Kurdish) and wanting to translate Kurdish.
T
You looking at wrong image. Kurdish and English installed in my site.
Hi, tecnizt , you can search keywords: "hooks.defineLocale('ku', " . you will find there some section "relativeTime ","did not translate to your language, you can copy from en hooks, and translate to your language.
T
Then?
Copy the file to the root folder?
Hi, tecnizt , you can search keywords: "hooks.defineLocale('ku', " . you will find there some section "relativeTime ","did not translate to your language,.
you can find relative time in en-gb is:
relativeTime : {
future : 'in %s',
past : '%s ago',
relative time in ku is:
relativeTime : {
future : 'له %s',
past : '%s',
so, just edit the file plugins_public/moment-with-locales.js , find this section:"hooks.defineLocale('ku',, add words like this:
relativeTime : {
future : 'له %s',
past : '%s pêşî',
T
Thank you very much. Where did you find Kurdish words :)). I very appreciated. I will try to edit. Thank very very much.
It looks like our version of moment.js library doesn't support Kurdish language, but as I see latest version does have ku.js, which is most probably Kurdish language, we'll update moment.js in the upcoming version, and after you update your site to UNA 11 date/time values should be translated automatically:
https://github.com/unaio/una/issues/2560
😊