Support » Plugin: Events Manager - Calendar, Bookings, Tickets, and more! » [Plugin: Events Manager] Different formatting of money display in French

  • Resolved MarcGuay

    (@marcguay)


    Hi,

    In the French language the dollar sign comes after the number, not before. I would like to modify how it’s displayed based on the current language (using qTranslate). I have found the code which outputs it (templates/forms/bookingform/tickets-list.php line 36) and could add my own logic to the core code but obviously I’d prefer to do this in an update-proof manner. Any suggestions?

    http://wordpress.org/extend/plugins/events-manager/

Viewing 8 replies - 1 through 8 (of 8 total)
  • hi,

    you can try to hook into em_ticket_get_price filter and format accordingly.

    Thread Starter MarcGuay

    (@marcguay)

    Thanks.

    Thread Starter MarcGuay

    (@marcguay)

    It doesn’t look like this will work actually. ’em_ticket_get_price’ only deals with the number, the formatting is done immediately afterwards by em_get_currency_formatted() and I don’t see anything to hook onto in there. It’s interesting that there’s an option to set the currency format, but I wouldn’t be able to put an if($lang==’giberish’) switch in there without hacking plugin core. Any ideas?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    see Settings > Booking Options > Pricing Options, you can edit the formatting there.

    Thread Starter MarcGuay

    (@marcguay)

    Thanks, I’ve found that, as my question stated:

    It’s interesting that there’s an option to set the currency format, but I wouldn’t be able to put an if($lang==’giberish’) switch in there without hacking plugin core.

    So is there a way to have it be $3.00 in English and 3.00 $ in French?

    1. that settings is located at Settings > Booking Options > Pricing Options > Currency Format

    2. that might not be possible at the moment; however there is a way but not upgrade safe e.g. modify php file at em.functions.php function em_get_currency_formatted

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    I’ll add a filter there for you in the next update. you could assume the filter will be called em_get_currency_formatted and will pass on the arguments given to the function.

    Thread Starter MarcGuay

    (@marcguay)

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Events Manager] Different formatting of money display in French’ is closed to new replies.