TWIG: Translation dependent on page header (frontmatter) content

I use a similar approach, but with a set variable, something like

{% set event_freq = ('PLUGIN_EVENTS.EVENTS.FREQ_' ~ page.header.event.freq|upper)|t %}
...
<span>{{ event_freq|e }}</span>

with some checking if string has translation
I’m fine with it as it works) but would be interested to see other options

by the way, in your case you can use switch tag

{% switch page.header.event.freq %}
  {% case 'daily' %}
     {% set event_freq = 'PLUGIN_EVENTS.EVENTS.FREQ_DAILY'|t %}
  {% case 'weekly' %}
     {% set event_freq = 'PLUGIN_EVENTS.EVENTS.FREQ_WEEKLY'|t -%}
  {% case 'monthly' %}
     {% set event_freq = 'PLUGIN_EVENTS.EVENTS.FREQ_MONTHLY'|t -%}
  {% case 'yearly' %}
     {% set event_freq = 'PLUGIN_EVENTS.EVENTS.FREQ_YEARLY'|t -%}
  {% default %}
     {% set event_freq = 'PLUGIN_EVENTS.EVENTS.FREQ_NONE'|t %}
{% endswitch %}
...
<span>{{ event_freq|e }}</span>