First of all, I wanted to say that I know nothing about PHP (it is totally not my pair of shoes). I was asked to make something in Wordpress theme, that will translate text in the button, depends on site language. The difference is visible only in slug so I assume, that I have to somehow get info is slug contains "en" or "de" and pass that info to translate function.
Problem is, that I don't know where to start. I will appreciate any kind of help.
<div class="read-more clearfix">
<a class="button post-button" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php esc_html_e('Read more', 'astrid'); ?></a>
</div>