Title: marcreig's Replies | WordPress.org

---

# marcreig

  [  ](https://wordpress.org/support/users/marcreig/)

 *   [Profile](https://wordpress.org/support/users/marcreig/)
 *   [Topics Started](https://wordpress.org/support/users/marcreig/topics/)
 *   [Replies Created](https://wordpress.org/support/users/marcreig/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/marcreig/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/marcreig/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/marcreig/engagements/)
 *   [Favorites](https://wordpress.org/support/users/marcreig/favorites/)

 Search replies:

## Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Switcher names and order: how to change'em and vary for every language?](https://wordpress.org/support/topic/switcher-names-and-order-how-to-changeem-and-vary-for-every-language/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years ago](https://wordpress.org/support/topic/switcher-names-and-order-how-to-changeem-and-vary-for-every-language/#post-3792239)
 * Thank you!
 * But I’ve finally decided to create a different way. I was waitting to your answer
   to see if there was a simply way to do that. As it required programming, I’ve
   done this:
 *     ```
       <div class="languages">
       	<ul>
       		<?php
       			$languages = pll_the_languages(array('echo'=>0));
       			echo preg_replace_callback('/(<a.+>)([^<]+)(<\/a>)/i', function($m){
       				return $m[1].pll__($m[2]).$m[3];
       			}, $languages);
       		?>
       	</ul>
       </div>
       ```
   
 * And I’ve created the words “English” and “Español” in functions.php, and added
   the translations in Admin board.
 * 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Exporting full WP MySQL DB = losing polylang strings translations!](https://wordpress.org/support/topic/exporting-full-wp-mysql-db-losing-polylang-strings-translations/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/exporting-full-wp-mysql-db-losing-polylang-strings-translations/#post-3686017)
 * Thanks god!
 * Polylang 1.1 & it’s widget group removing feature on Administration Panel, solved
   the problem!! Now everything runs fine!
 * Thank you so much for all your efforts and attention! 🙂
 * ‘Til next time!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Exporting full WP MySQL DB = losing polylang strings translations!](https://wordpress.org/support/topic/exporting-full-wp-mysql-db-losing-polylang-strings-translations/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/exporting-full-wp-mysql-db-losing-polylang-strings-translations/#post-3686005)
 * Oh, I’ve forgot to say, that what Black Studio TinyMCE Widget had, was a **HTML
   rich text strings** inside, so maybe there is a problem with codification and**
   bad quotes escape on reading from DB** on the plugin?
 * As the data is propperly inside the DB, but it doesn’t show on Admin Settings
   page, I think this could be a problem based on the **reading/escaping quotes 
   from DB** in the plugin behavior’s.
 * Could it be?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Exporting full WP MySQL DB = losing polylang strings translations!](https://wordpress.org/support/topic/exporting-full-wp-mysql-db-losing-polylang-strings-translations/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/exporting-full-wp-mysql-db-losing-polylang-strings-translations/#post-3686004)
 * Ok.
    I’ve seen what could be the problem:
 * – I’ve installed Black Studio Widget, and this guy added automatically a lot 
   of strings on “Strings Translate” page on Settings.
 * Those strings get imported correctly on the file, but they don’t show on the 
   panel when imported on Localhost! There only appears the normal strings (functions.
   php ones + the exsiting ones on Polylang).
 * So in localhost, if I modify some of the strings and Save, suddenly the DB gets
   cleaned and only appears the visible strings, deletting the black studio ones
   from DB (as I said, those were on the DB, but they didn’t show on the administration
   panel!). From now on, everything works fine.
 * So I need to delete those strings from this page, but this is not possible. Those
   are “ghost strings” that are not propperly shown on panel, but they exists inside
   wp_options on polylang records! As so, cleanning DB it’s not useful!
 * I’ve tried to do it manually agains DB record. It’s not useful, because when 
   you save on Polylang, indexes on JSON string got rewritted, as I’ve seen.
 * So this is a dead end!
 * On the remote host I SEE those strings on administration panel.
    I’ve emptyned’em
   and tried to save cleaning the DB. Stills not useful. Even deactivated the widget,
   and uninstalled it. Nothing!
 * How do I proceed?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Exporting full WP MySQL DB = losing polylang strings translations!](https://wordpress.org/support/topic/exporting-full-wp-mysql-db-losing-polylang-strings-translations/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/exporting-full-wp-mysql-db-losing-polylang-strings-translations/#post-3685995)
 * As it’s a FULL exporting of a DB, from PHPMyAdmin on my online host, and then
   an import from this very same file to localhost via Navicat software, it’s should
   be obvious that they are.
 * And yes, they are!
 * WP_TERM:
 * localhost: [http://i.imgur.com/StOAZWP.png](http://i.imgur.com/StOAZWP.png)
    
   online: [http://i.imgur.com/mTB6vZx.png](http://i.imgur.com/mTB6vZx.png)
 * WP_OPTIONS:
 * localhost: [http://i.imgur.com/yxiVHUY.png](http://i.imgur.com/yxiVHUY.png)
    
   online: [http://i.imgur.com/oSULSRm.png](http://i.imgur.com/oSULSRm.png)
 * So I encourage you to test it by yourself if you can, please!
 * I really need to know how to solve this, as if anything happens someday, I’ll
   need a DB copy, and with this, we really have a problem!
 * Just EXPORT a DB from an online host WP you have with Polylang, and simply import
   the DB copy from a local WP copy you have. Just watch! 🙁
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Exporting full WP MySQL DB = losing polylang strings translations!](https://wordpress.org/support/topic/exporting-full-wp-mysql-db-losing-polylang-strings-translations/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/exporting-full-wp-mysql-db-losing-polylang-strings-translations/#post-3685965)
 * Well, so it happens!
    Cause in OPTIONS table I’ve the correctly imported registers,
   as you can see (this is an screenshot from localhost! After importing! And the
   registers are allright, with the right translations):
 * > [View post on imgur.com](https://imgur.com/iNCNziT)
 * And the translations are inside the DB, with no problems at all, they’re correct.
 * BUT, they don’t show on Admin page and of course, they don’t load, as in Admin
   page, only var_names are loaded.
    Look:
 * – What should be on localhost AFTER importing via .SQL executing against DB (
   this is a screenshot form the online version, the right one):
 * [http://i.imgur.com/8IlKGxC.png](http://i.imgur.com/8IlKGxC.png)
 * – What on localhost really is AFTER executing the .SQL file (after importing).
   This is a screenshot from the local version after the import. The BAD one:
 * > [View post on imgur.com](https://imgur.com/6JoBu3z)
 * And as I said, I’ve done nothing more than simply executing an IMPORT on Navicat
   or in PHPMyAdmin from a previously EXPORTED file from the online host!
 * Any idea?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Twitter Widget Pro] Can't authorize twitter account](https://wordpress.org/support/topic/cant-authorize-twitter-account/)
 *  [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/cant-authorize-twitter-account/page/2/#post-3524207)
 * Ok, let’s see:
 * – I’m developing on localhost. And it is NOT working on localhost.
    – I’ve created
   the APP on tweeter, wrote the real .org domains on fields, even callback URL,
   and saved everything. – Then I’ve authorized app on same twitter details page,
   and everything show fine now.
 * > [View post on imgur.com](https://imgur.com/W7naw0q)
 * – Then authorized localhost on [@anywhere](https://wordpress.org/support/users/anywhere/)
   domains like this:
 * > [View post on imgur.com](https://imgur.com/8Sml9L4)
 * as twitter doesn’t like “localhost”.
 * So everything is fine, isn’t it?
 * – So everything OK on WP, on plugin settings page, but still having to authorize
   the app there, so when I press the button, I got this:
 * > [View post on imgur.com](https://imgur.com/ZsiAukQ)
 * Is this because localhost?
 * Don’t know what to do… 🙁
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] pll_e() / pll__() on functions.php = KO](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/#post-3462347)
 * It’s over! 🙂
 * It was the update what resolved it!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] pll_e() / pll__() on functions.php = KO](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/#post-3462346)
 * Hey!
    Anything new?
 * As I said, I’ve made no modification to original theme.
    Just functions.php with
   the function to be called and the call on a site.js. That’s it.
 * Oh and for if it’s useful, I’ve this over the function:
 *     ```
       add_action( 'wp_ajax_nopriv_loadMorePosts', '_loadMorePosts' );
       add_action( 'wp_ajax_loadMorePosts', '_loadMorePosts' );
       ```
   
 * edit:
 * Oh wow man! I’ve recently seen that there was a new Polylang update! And you 
   know what? Now it works!! No more PHP error there! :_)
    Thanks man! Don’t know
   what you’ve resolved (I guess file dependencies on load time…) but now it works
   wonderfully! 😉
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] pll_e() / pll__() on functions.php = KO](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/#post-3462336)
 * Nop.
    I’ve modified nothing at all… I’ve just made a JS file with the respective
   jQuery $.post(…) call, with some data which I’ve showed you before, and that’s
   it! On functions.php, I’ve the function which does the WP_Query call and it’s
   over!
 * 🙁
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] pll_e() / pll__() on functions.php = KO](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/#post-3462323)
 * [http://viewportindustries.com/products/starkers/](http://viewportindustries.com/products/starkers/)
 * I’ve changed nothing. I’ve created my index and whatever… but I’ve not modified
   anything in general.
 * So you try! 🙂
 * Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] pll_e() / pll__() on functions.php = KO](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/#post-3462318)
 * Well, yes. I’ve used the STARKERS empty (blank base) theme, to do and create 
   my own theme. From very scratch.
 * So everything is ok, I think so.
 * So right now, what should I do?
    I mean, can I recieve translated posts or not?
 * Will you publish the update without being a development unit, soon?
 * Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] pll_e() / pll__() on functions.php = KO](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/)
 *  Thread Starter [marcreig](https://wordpress.org/support/users/marcreig/)
 * (@marcreig)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/pll_e-pll_-on-functionsphp-ko/#post-3462312)
 * Well then, I’ve done this:
 * 1) Changed option to number 2, which is appending the language on every single
   URL.
    Nothing changed. Keep recieving block in English when I’m working in Spanish
   on web’s home.
 * 2) On AJAX request, I’ve added on data block for the POST request the variable“
   pll_load_front”.
    And I’ve tried like this:
 * `$.post(AdminAjax.ajaxurl, { action: “loadMorePosts”, cont: cont, ptype: ptype,
   pclass: pclass, offset: offset, pll_load_front: true }).done(function(data) {
   //
   alert(“Data Loaded: ” + data); button.remove(); $(“.loadmorepostsimg”).remove();
 *  $(“.”+cont).append(data);
    });
 * And I’ve tried like “pll_load_front: ‘pll_load_front'” too.
    Nothing happened.
 * Keep recieving in both cases texts in english.
 * So, could you explain me the exact steps I should take to make it work please?
 * Thank you so much! 🙂
 * —————————–
 * EDIT:
 * Since I’ve added on ajax request **pll_load_front: 1**, now when I push the button
   to load more posts, I get this error:
 * _Fatal error: Call to undefined method Polylang\_Core::register\_string() in …….
   
   
   
   So I guess that adding pll_load_front: 1 has done something at last (I’ve cleared
   the cache to see that it was really doing something). But now, it works no more.
   If I remove pll_load_front: 1, then everything works normally.
 * Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)