Title: wordpress android app
Last modified: August 21, 2016

---

# wordpress android app

 *  Resolved [sneike](https://wordpress.org/support/users/sneike/)
 * (@sneike)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/wordpress-android-app-1/)
 * Using the wordpress android application, if you create a new post from the app,
   it is automatically assigned to the default polylang language.
 * Instead, uploading a new media from the app, it won’t have any default language
   assigned! This means that if I create a new gallery in a post containing these
   pictures, they won’t show.
 * Any chance to solve this issue behaving in the same way as the posts? (i.e. new
   media uploaded by the app will have the default polylang language assigned.)
 * Thanks for your support
    DNL
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

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

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/wordpress-android-app-1/#post-5138225)
 * Hi!
 * I can’t test it myself. Can you try to edit the file polylang/frontend/frontend-
   filters.php
 * At line 48, add:
 *     ```
       add_action('add_attachment', array(&$this, 'set_default_language'));
       ```
   
 * At the end of the file, just *before* the last `}`, add:
 *     ```
       public function set_default_language($post_id) {
       	if (!$this->model->get_post_language($post_id)) {
       		if (isset($_REQUEST['lang']))
       			$this->model->set_post_language($post_id, $_REQUEST['lang']);
   
       		elseif (($parent_id = wp_get_post_parent_id($post_id)) && $parent_lang = $this->model->get_post_language($parent_id))
       			$this->model->set_post_language($post_id, $parent_lang);
   
       		else
       			$this->model->set_post_language($post_id, $this->curlang);
       	}
       }
       ```
   
 *  Thread Starter [sneike](https://wordpress.org/support/users/sneike/)
 * (@sneike)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/wordpress-android-app-1/#post-5138251)
 * Great Chouby, it works fine! Every media I add from the wordpress android app
   has now the default language set! 🙂
 * Will you implement these lines of code in the next versions? Or I need to backup
   the modified file every time I will update?
 * Thanks
    Daniele
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/wordpress-android-app-1/#post-5138253)
 * Thanks for your feedback.
    I will include the fix in the future version.

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

The topic ‘wordpress android app’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Chouby](https://wordpress.org/support/users/chouby/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/wordpress-android-app-1/#post-5138253)
 * Status: resolved