The translation tag has no wiki summary.
14
votes
3answers
2k views
Change language by clicking a button
The goal is to offer a button/select drop-down or similar to switch the public interface1) language on the fly.
What I'm searching for
Plugin or Theme Code...
... or Ideas
Using a work-around with ...
10
votes
2answers
770 views
pass object/JSON to wp_localize_script
I've got a working piece of javascript that contains an object literal.
But I need to localize it, and I'm ytrying to figure out how to rewrite it so that I can get wp_localize_script() to accet it, ...
5
votes
1answer
528 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 ...
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 ...
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 ...
4
votes
1answer
158 views
What is a Theme textdomain?
I've found that any WordPress theme uses this functions, but I don't understand what is the purpose of it and what is it, in this case 'themify'?
Here are some examples in Themify functions.php:
1).
...
4
votes
2answers
1k views
How-to: Translate plural forms for themes/plugins with PoEdit
As the title says: How would you translate...
_n()
_n_noop()
_nc()
_nx()
_nx_noop()
...in your .mo files?
4
votes
1answer
87 views
Obtain a list of available translations
In answering this question: Change language by clicking a button. It was necessary to obtain a list of languages for which translations were available (i.e. their po/mo files were present in ...
3
votes
1answer
553 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 ...
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 ...
3
votes
2answers
159 views
How to concatenate inside the _e() function the right way?
I'm trying to create a function for the title inside my functions.php, I'm having a problem with the search title part where I have to concatenate here's the part with issues:
elseif (is_search()) {
...
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
2answers
213 views
How to prevent text modified using gettext filter being stomped (presumably) by updateText() js function within a CPT's edit screen
First a teeny bit of background... I have a custom post type where I'd like to use custom post statuses. Since custom post statuses (stati/status/whatever), have not been fully implemented within the ...
3
votes
2answers
111 views
What is the purpose of adding a .po file?
I added the below code to the function.php of a .po file and finished localization and edited the webconfig.php to add Arabic language but nothing happened. I want to know what should happen. Will the ...
3
votes
3answers
745 views
Titles in my sidebar widget appear in all languages - with qtranslate
So here's my code, using the qTranslate plugin:
query_posts(array('post_type' => 'uk_blog', 'numberposts' => 2));
$i = 0; while(have_posts()): the_post($post);?>
<div ...
3
votes
1answer
416 views
Setting WPLANG from a plugin
For a single site wordpress, the language must be set from wp-config.php's WPLANG, but is it possible to set from my plugin which override the default value?
3
votes
1answer
298 views
How to save a translation of a plugin in “CodeStyling Localization”?
Hi I was translating one of my plugins in "CodeStyling Localization". when I update my plugin my translation erased. Is there anyway to find it ? And How can I backup my translation (I don't want to ...
3
votes
1answer
163 views
what's different between _x() and _()
What's different between _x() and _(). For example: if a1 can translate as:
a1 has meaning x1;
a1 has meaning x2;
How _x() function to get value x1 or x2?
3
votes
2answers
1k views
Open Source replacement for WPML?
Since WPML is not free anymore and still one of the most used Wordpress Translation Plugins, is there an open source project that keeps development going? Or something similar that replaces it?
I ...
3
votes
1answer
161 views
How do I translate: “2 hours and 15 minutes”?
I want to translate the generic phrase "x hours and y mintues". Of course, if it's only one hour, it should say "1 hour and y mintutes". The same goes for minutes, "x hours and 1 minute." I know ...
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 ...
3
votes
1answer
117 views
Overwrite textdomain of plugins by default - Lost Translation
Wordpress is awesome, but there is something that is driving me crazy.
Whenever a plugin or a theme is updated, all files are deleted and replaced.
So if I have custom code or a translation in one ...
2
votes
2answers
104 views
List of Default Translated Phrases
With <?php _e('Save Changes') ?>, I know the phrase, "Save Changes" can be translated automatically if the user's locale is set to a different language. I'd like to know if there is a list of ...
2
votes
2answers
2k views
Help with “text domain”, comments_form in WordPress theme
I've been plugging away at creating my own theme and am pretty much there, but ran the Theme Check plugin and had a few concerns/questions:
Throughout the theme, wherever there is text, I've used ...
2
votes
1answer
519 views
Plugin Localization
i've just built my first plugin for wp, and even if it's not a great "code poetry" ;) it works as it should.
It's a plugin that transform the default wp gallery using the GalleryView 3.0 jquery plugin ...
2
votes
1answer
2k views
Best way to filter featured image text for a custom post type?
I am trying to change the "Set featured image", "Remove featured image", and "Use as featured image" text links of a custom post type for my plugin Meteor Slides.
I found the ...
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', ...
2
votes
1answer
44 views
Make changes to translation?
I'm using finnish translation of wordpress. I found the fi.po file which contains all the translations, but for some reason, editing the contents wont edit the contents of the page.
Can I make ...
2
votes
1answer
877 views
Translate Navigation Menu & Sidebar Widget Titles
Is there any plugin to translate navigation menu & sidebar widget titles ?
2
votes
1answer
1k views
[Plugin WPML] : How to create a translation of a post using the WPML API?
I'm trying to figure out how to create a translation for a post using the internal WPML API (inc/wpml-api.php)
I simply want to create a translation for post ID xx, set some content and publish it.
...
2
votes
1answer
32 views
Making a configurable field translatable
I'm working on a theme right now that gives the admin the possibility to set different texts that are used within the theme, by configuring them in the admin panel (e.g. the text that is displayed, ...
2
votes
1answer
541 views
How to Translate Contact Form 7 using qTranslate?
I'm using Contact Form 7 for my forms and also qTranslate to translate my website.
I would like to translate all my fields and for that I used:
<!--:en-->First Name ...
2
votes
1answer
440 views
How to use get_option() without any filter?
I'm using the newest WordPress 3.3.1 and newest qTranslate 2.5.27. I have made some an AJAX script which returns a value and message in the current language.
Here I get my first problem, I solve it ...
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 ...
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 ...
1
vote
3answers
419 views
Suggestions for i18n plugin
Could you please suggest me good plugins (that you have used) for translating a WordPress website? It should be wonderful if you can add as well a pros and cons list with your suggestion. Thanks in ...
1
vote
1answer
40 views
Creating a custom multilingual form
I need to create a special form for my website where users cand specify a series of data including some textfields, combo boxes and sliders (from 0 to 100). Also I need this form to be qTranslate ...
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 ...
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 ...
1
vote
1answer
113 views
How do translated, escaped strings (esc_attr) in Themes work?
I was looking at the TwentyEleven code and found this:
esc_attr__( 'Permalink to %s', 'twentyeleven' )
This is come code that came out of the title tag for a post; the full code within the title ...
1
vote
1answer
142 views
Widget translation on my plugin
I am adding i18n to the widget on List Category Posts. I've correctly created the pot file, and po and mo files for Spanish and English. All of the Strings are being displayed with _e() on the form ...
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 ...
1
vote
1answer
118 views
Where do I find (free) fully-internationalized themes?
I'm trying to find a theme which is fully internationalized. I've perused the list of translation-ready themes in the theme gallery, but each one seems to be missing some little detail here and there.
...
1
vote
1answer
22 views
How to use Yoast SEO backend in english even if WPLANG variable is not english?
I added this code to my functions.php file
add_filter('locale', 'wpse27056_setLocale');
function wpse27056_setLocale($locale) {
if ( is_admin() ) {
return 'en_US';
}
return ...
1
vote
2answers
37 views
Translating long texts with html formatting
I was wondering what is the best way to translate some longer texts with html formatting. There was a couple of solutions I came across, but did not know what would be the best one.
Writing a couple ...
1
vote
2answers
238 views
How to translate __('') strings in admin
What would be the best plugin to use for translating website.
Thing is - i installed one multilingual plugin, but it does not pick up strings from templates. For example - the template has stuff lke
...
1
vote
1answer
1k views
Translating a custom taxonomy
How do I go about translating custom taxonomy terms?
I am essentially trying to allow authors to see the terms in English and let the subscribers see the terms in Spanish.
I am not running a ...
1
vote
1answer
126 views
POMO_Reader->substr() call endless loop?
I'm experiencing a somewhat endless loop in the file mo.php
/wp-includes/pomo/mo.php
when loading the site's default text domain.
The PHP error is:
Fatal error: Maximum execution time of 30 ...
1
vote
0answers
23 views
translation does not work for 'Home'
Using the birdtips theme, translation of messages generally works, with some minor omissions.
When I click on a page, a new line appears below the header image saying
Home >> MyPage
Now, ...
