I have been trying for a while but the strings defined in a custom format preset do not show up for translation. Is this correct?
Sorry if I am missing something, but the only close relevant post I found was #973564: formatPlural, which is not exactly my case.

Thanks for an excellent module btw.

Comments

AndyThornton’s picture

I'd be interested to know if there are any translations possibilities too, please.

AndyThornton’s picture

I figured out a way around it. It may help some people who are okay writing a tiny bit of PHP.

Somewhere where you can output PHP (a custom block? a module? a node?) you can use one of the example in the readme file.

e.g. (didnt try this exact code ... pls forgive any typos). as you can see the word 'hours' get passed through the translate function. you can follow this pattern for mins, secs etc

echo '
2014-10-26T10:28:00-07:00
down
%hours%' . t('hours') . '
';

jvandervort’s picture

You are all correct, there is no provision for translating strings input as custom formats. Translating "user entered data" is a tricky thing. If the workaround works for you, GREAT:)