While I’m adding gettext functions to the theme, I’m a bit confused about do I need to wrap every string with gettext functions to make them translatable?
Firstly I thought I should make all of them translatable but since theme options and shortcode generator involve some specific instructions and perhaps, those wouldn’t relate to what buyers want to translate. So, I’m confused in this point.
For example; do I need to make theme options module and shortcode generator translatable? Or I just have to deal with CPT and any other elements that will be displayed in the front-end only?
Thanks in advance for your advice.
You have to wrap absolutely all text strings into e(‘text’, ‘domain’); for echoing strings or __(‘text’, ‘domain’); for returning strings.
Before the e, there’s an _ .. but this editor doesn’t allow me to type it
Thank you Ruben.
Actually I’ve wrapped almost text strings with those functions but, just wondering that do I need to wrap the strings which are in some back-end areas like Theme Options and Shortcode Generator panel?
I was thinking about this question because I see that those back-end areas include the specific instructions of how to use them so I’m not sure whether buyers want to translate them for their sites or not.
I never have experience making the theme translation-ready before and that’s just my curiosity.
I shouldn’t think too much, just simply wrap them all or what do you suggest?
Some buyers like to also translate the admin panel for clients, but others don’t.. But i’ve seen a lot of site translation the admin panel, so you should include that as well..
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.