I’m new using Sage and I would like to know if there is any way to change the text-domain automatically.
text domain is ‘sage’ and I want to call it as my template name
<?php _e('Sorry, but the page you were trying to view does not exist.', 'sage'); ?>
to <?php _e('Sorry, but the page you were trying to view does not exist.', 'my-template-name'); ?>
I could do a find-replace but I wonder if theres any way to do it automatically.
I know it has no effect on the functionality and it is probably a nonsense but the reason is:
WPML Plugin organize string translations by his text domain in the admin area. I just want WPML to show my theme name as domain name instead of ‘sage’. Thats all.
Hi, I’m new to sage and can’t believe this is the case. From the wordpress theme developers handbook:
“The text domain must match the slug of the theme. If your theme’s name My Theme is defined in the style.css or it is contained in a folder called my-theme the domain name should be my-theme. The text domain name must use dashes and not underscores and be lowercase.”
I don’t really see the need to open an issue for this. Most editors have a find/replace feature that’s easy enough to use (search: 'sage'), unless I’m missing something.
Update: indeed changing all ‘sage’ occurrences and updating/scanning the theme again, TextDomain also changed to my custom one. It seems it’s automatic, without loading textdomain via load_textdomain() or anything.