Tagged Questions
0
votes
1answer
23 views
Does the textdomain have to be the theme's name?
Does a theme's text domain have to be the actual theme name?
If you develop WP themes, couldn't you just use the same name (perhaps your business name) for all the theme's you develop, making it ...
0
votes
0answers
31 views
Backend in English and Frontend in Defined Language
I need to translate just dates and days of the week to the custom language in the frontend, but keep the backend admin panel in English. Can I simply remove all unnecessary strings from the default ...
2
votes
2answers
71 views
Should i use _n for pronouns in translation?
I use _x() now! I accepted the answer just because he understood right and was first. So don't get confused!
$like_me_on = __('Like me on %s', 'my-plugin');
$like_us_on = __('Like us on %s', ...
1
vote
0answers
53 views
Wordpress translation loading english file
I am trying to translate a wordpress site but whatever I do the english file is always loaded.
In functions.php I've set load_theme_textdomain('twentyeleven', get_template_directory() . ...
0
votes
1answer
44 views
Display Today's date outside the loop?
Is there any way to display the Today's date outside any loop/post using WordPress date/time function instead of using the PHP date() function?
I'm using the PHP date() function but it does not ...
1
vote
2answers
123 views
variables in translatable text
I am adding a list of suggested plugins to my theme using TGM Plugin Activation - https://github.com/thomasgriffin/TGM-Plugin-Activation/
However, when I run theme check, about 40 or so ...
3
votes
1answer
555 views
How to make a WordPress plugin translation ready?
What is the best way create a plugin that is translation ready?
It doesn't have to be translated from the beginning but it has to be easily translatable so fellow developers from different cultures ...
0
votes
2answers
56 views
How to i18n text coming from the db or from an external source
I'm writing a plugin and i wanted to i18n correctly text which i'm storing in the db or in an external file. How should i do that?As of now we are generating pot files with wordpress and so all the ...
1
vote
1answer
64 views
How do I translate this string - PHP syntax question
I need some help on how to correctly format this code snippet for translation:
<?php next_post_link( '%link', __( '<span class="meta-nav">←</span> Nästa nyhet') ); ?>
I've used ...
1
vote
2answers
36 views
Internationalization and functions that use it
I'm building a new design into WP and so technically it is a theme, however it is only a design for one site and won't be a theme anyone can use and hence I don't want to bother with ...
5
votes
1answer
127 views
Gettext details
I've got a few gettext() questions that are not covered anywhere in WordPress Codex but I think they are important.
__('string') in THEME should be used for strings that are likely to be present ...
3
votes
1answer
110 views
What is the purpose of an extra file for translation?
What code is required to put in functions.php in order to make the theme translation ready?
The TwentyEleven theme has only following line:
load_theme_textdomain( 'twentyeleven', ...
3
votes
4answers
1k views
How to translate a plugin via .po .mo?
I want to translate this plugin. This plugin already has translations to some languages, and it has .pot file for adding new languages (as far as I understood from description). Although I never had ...
0
votes
1answer
342 views
My custom fields aren't getting translated [closed]
I've been using a class to build custom fields in my WP themes, it basically allows me to create custom text, radio, dropdown fields, etc and it's working fine. However I created a text custom field ...
5
votes
1answer
531 views
How to provide translations for a WordPress TinyMCE plugin?
I know that I can get my translations into JavaScript doing:
$MyTranslations = array(
'translation1' => __("Some String 1", "MyTranslations"),
'translation2' => __("Some ...
0
votes
3answers
525 views
Internationalize plugin so strings can be translated in WPML
A third party developer made a text widget with title, body and thumbnail. This accompany widget plugin has not been internationalized and therefore the strings do not appear in WPML's string ...
3
votes
2answers
277 views
Localization: I want the backend: english and frontend in defined language
I'd like to have the backend of Wordpress in English and use a different locale for the frontend
so far I figure out perhaps I could do it by setting in the wpconfig the locale I want to use in the ...
0
votes
4answers
941 views
Proper way to create / manage gettext (.po, .pot) files?
So I'm trying to figure out how .po and .pot files work, seeing as this is what Wordpress seems to use. But I can't wrap my head around it.
I get that a .pot file is a template file that indicates ...
2
votes
1answer
241 views
Adding another arg to comments_popup_link
what WordPress core functions do I have to modify to change
comments_popup_link('Ni komentarjev', '1 komentar','% komentarjev')
to
comments_popup_link('Ni komentarjev', '1 komentar', **'2 ...
2
votes
1answer
373 views
Change language of comments template
I have a Wordpress installation in italian, I need to keep italian for the admin section but the frontend needs to be in english. The theme is custom so that's ok, but in single posts I'm using ...
4
votes
4answers
2k views
Theme localization of “slugs” (custom post types, taxonomies)
in my theme I want to define a series of custom post types and custom taxonomies, each one having its own customized slug; the base language of my theme is english, therefore the slugs will be in ...
0
votes
1answer
118 views
Wordpress localization - gettext and git
We're about to start working on localization of a highly customized wordpress theme with over 200 php files. We're using git for version control. Are there any particular hints or warnings we should ...
0
votes
2answers
156 views
localization of theme and plugins to English (originally in another language)
We're about to start localizing a wordpress installation with a highly customized theme and several custom plugins. Unfortunately it is not gettext-ready, and also the original theme is not in ...
1
vote
1answer
47 views
The effect of x() family of functions
So I know that _x() and it's wrappers allow a developer to specify the context of a translated string. I'm pretty clear on "how" to use this function as well as "why" it should be used. I am wondering ...
