Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
297 views
in Themes by
Hello

I want to write a custom text inside my template that can be translated. I looked at the documentation. In plugins, it is possible to create custom text or words, that is, plugins have the ability to translate, but I want the same feature for the template. I want to create a file called qa-lang-....php and display the desired texts in different places of my template. How do I do this?
Q2A version: 1.8

1 Answer

+1 vote
by

I don't know it's possible or not, But I'm using Private Variables inside my Theme, instead of looking the whole theme to find all the custom text I've used in theme now I can find all of them in top of my theme, I've declared them inside this class.

qa_html_theme extends qa_html_theme_base

You can call them wherever you need

$this->name_of_variable

...