Remove accents from greek text

Hello. I am working on a website that uses greek as the default language.

There is some content that gets entered as normal sentence case text but then is converted to uppercase using css.

fore example “μέλι” is converted to “MΈΛΙ”.

What I would like to do is use php to remove the accents so that “μέλι” becomes “MΕΛΙ”.

I imagine something like that would work best:

<?= $product->text()->noAccents() ?>

Any of how to implement such a method with Kirby.

Thanks

You can create a custom field method to achieve this: https://getkirby.com/docs/reference/plugins/extensions/field-methods

Thank you. This is the solution I came up with in case anyone finds it usefull.

<?php
Kirby::plugin('remove/greekAccents', [
    'fieldMethods' => [
        'noGreekAccents' => function ($field) {
            $unwanted = array('ά'=>'α', 'έ'=>'ε', 'ή'=>'η', 'ί'=>'ι', 'ό'=>'ο', 'ύ'=>'υ', 'ώ'=>'ω');
            $field->value = strtr( $field->value, $unwanted);
            return $field;
        }
    ]
]);