Title: KLicheR's Replies | WordPress.org

---

# KLicheR

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Polylang Conflicts with Avada Theme](https://wordpress.org/support/topic/polylang-conflicts-with-avada-theme/)
 *  [KLicheR](https://wordpress.org/support/users/klicher/)
 * (@klicher)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/polylang-conflicts-with-avada-theme/page/2/#post-5375874)
 * Hi,
 * I just want to share my temporary fix.
 * **Here’s my Polylang (version 1.6.4) options**
    – 2 lang (“en” set as default
   + “fr”); – Language determine by directory; – Default language is not hidden.
 * **Here’s what I observed**
    – Editing Avada options in “All languages” update“
   Avada_options”; – Editing Avada options in “English” update “Avada_options”; –
   Editing Avada options in “French” update “Avada_options_fr”; – Accessing a french
   page for the first time create the option “Avada_options_fr” by making a copy
   of the option “Avada_options”.
 * **These code snippets can be injected in the “functions.php” of your theme or
   in your plugin.**
 * This one will assure that the “Avada_options” is load every time:
 *     ```
       // If trying to get the localized options...
       add_filter('option_Avada_options_fr', function($value) {
       	// Return the good ones.
       	return get_option('Avada_options');
       });
       ```
   
 * These one will assure that you can update the theme options even if your not 
   in the default or “All languages” polylang settings:
 *     ```
       // If trying to create localized options...
       add_action('add_option_Avada_options_fr', function($option, $value) {
       	// Delete the localized options just created.
       	delete_option('Avada_options_fr');
       	// Add/update the good ones.
       	update_option('Avada_options', $value);
       }, 10, 2);
   
       // If trying to update localized options...
       add_filter('pre_update_option_Avada_options_fr', function($value, $old_value) {
       	// Update the good ones.
       	update_option('Avada_options', $value);
       	// Return the same value for cancelling the update.
       	return $old_value;
       }, 10, 2);
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Translating Custom Post Type & Taxonomy Slugs](https://wordpress.org/support/topic/translating-custom-post-type-taxonomy-slugs/)
 *  [KLicheR](https://wordpress.org/support/users/klicher/)
 * (@klicher)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/translating-custom-post-type-taxonomy-slugs/#post-3509678)
 * It’s the next item on my to-do list. I’ll keep you update.
 * Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Translating Custom Post Type & Taxonomy Slugs](https://wordpress.org/support/topic/translating-custom-post-type-taxonomy-slugs/)
 *  [KLicheR](https://wordpress.org/support/users/klicher/)
 * (@klicher)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/translating-custom-post-type-taxonomy-slugs/#post-3509676)
 * Ok! I’ll try to add this. But like I said, I did this for a particular project
   but keeping in mind that it can evolve as a general plugin or add to the core
   of Polylang so not all functionnalities of Polylang work for now and there is
   probably a lot of work to do so.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Translating Custom Post Type & Taxonomy Slugs](https://wordpress.org/support/topic/translating-custom-post-type-taxonomy-slugs/)
 *  [KLicheR](https://wordpress.org/support/users/klicher/)
 * (@klicher)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/translating-custom-post-type-taxonomy-slugs/#post-3509670)
 * Hi!,
 * I wrote a little plugin to handle translations of custom post type rewrite slugs.
 * I use it with lang prefix in URL (/**en**/my_post_type/title, /**fr**/mon_type_darticle/
   titre).
 * It also handle correct translation for “get_permalink()” function;
 * To translate your post types slugs, install/activate my plugin and use this code
   in your functions.php or in your plugin:
 *     ```
       add_filter('pll_translated_post_type_rewrite_slugs', function($post_type_translated_slugs) {
       	// Add translation for "my_post_type".
       	$post_type_translated_slugs['my_post_type'] = array(
       		'en' => 'my-english/rewrite-slug',
       		'fr' => 'my-french/rewrite-slug',
       	);
       	// Add translation for "product".
       	$post_type_translated_slugs['product'] = array(
       		'en' => 'products',
       		'fr' => 'produits',
       	);
       	return $post_type_translated_slugs;
       });
       ```
   
 * It is really NOT well tested. It work for the specified configuration: not a 
   multisite, language determine by folder (prefix /en, /fr) and only with post 
   types slugs. But hey, it’s a start:)
 * For now, it’s on a GitHub repo so if you want to make it better, just fork it.
   Maybe this could be eventually merge to Polylang, we’ll see.
 * **Polylang – Translate URL Rewrite Slugs**
    [GitHub Repo](https://github.com/KLicheR/wp-polylang-translate-rewrite-slugs)
   [Download latest version as zip](https://github.com/KLicheR/wp-polylang-translate-rewrite-slugs/archive/master.zip)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Attachment Files Importer] Does this work with Multisites?](https://wordpress.org/support/topic/does-this-work-with-multisites/)
 *  Plugin Author [KLicheR](https://wordpress.org/support/users/klicher/)
 * (@klicher)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/does-this-work-with-multisites/#post-3901518)
 * Hi,
 * I don’t test it on multisite but this plugin is closely inspired by the WordPress
   plugin [WordPress Importer](http://wordpress.org/plugins/wordpress-importer/)
   so I guess it is.
 * If you find out, let me know:)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Attachment Files Importer] Does this just download images?](https://wordpress.org/support/topic/does-this-just-download-images/)
 *  Plugin Author [KLicheR](https://wordpress.org/support/users/klicher/)
 * (@klicher)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/does-this-just-download-images/#post-3971263)
 * Hi,
 * Sorry for the delay, I’m not really familliar with the WordPress forum/support
   thing.
 * Yes, the plugin is just downloading images.
 * It read your DB for attachments entries you have and if you don’t have the file
   corresponding, it will try to download it from the URL you specified.
 * Here’s an example of use. You want to start developping on an ongoing project.
   You checkout the code locally but not the “uploads” folder. If you use a VCS 
   like Git, Mercurial or SVN, you normally don’t versionned the “uploads” folder
   cause it is too heavy. So you also dump the DB from your production site that
   contain entries for attachments. The only thing is missing are the image files
   and it’s where the plugin is useful.
 * When you’re developping, maybe other contents has been added to the production
   site with images. To update your developpement site, you’ll dump the DB and import
   it to your local site but again, images are missing. The plugin will retrieve
   them.
 * This plugin is maybe more adapted to a certain way of sites developpement.
 * I hope I answer your question and thanks for your interest.
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[Attachment Files Importer] something is wrong](https://wordpress.org/support/topic/something-is-wrong-1/)
 *  Plugin Author [KLicheR](https://wordpress.org/support/users/klicher/)
 * (@klicher)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/something-is-wrong-1/#post-7783408)
 * Hi!,
 * Thanks for taking the time to write about your problems with the plugin.
 * I fix something with URL trailing slash and add a report when the import operation
   end. If you want to see a detailled report of each operation, you can add this
   line to your **wp-config.php** file:
 * `define('ATTACHMENT_FILES_IMPORT_DEBUG', true);`
 * If the [new version 0.2](http://downloads.wordpress.org/plugin/attachment-files-importer.0.2.zip)
   doesn’t fix your problem, you can send me the errors of the detailled report 
   and I’ll try to help you.
 * Thanks again

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