Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Have you added content in those other languages?

    Is this going to be implemented? Or may be somebody has already a solution? I know there was one plugin called “Polylang displays all posts”, but I suppose it is not working anymore with the latest versions of Polylang.

    @sdayman
    I did the “Test your WordPress host’s available memory” and here is what I got:
    Current maximum memory configured in php.ini: 67108864
    Current memory usage: 43.75M
    Setting max memory to 90M.
    And after that Fatal error: Allowed memory size of 67108864 bytes exhausted.
    So the question arises – why Wordfence during this test set the max memory to 90M if I have set to use only 24M? Any ideas?
    When I disable live traffic logging and automatic scans, error is gone, but then what’s the point of having Wordfence activated if I can’t scan and see those loggs?

    I haven’t had problems before with default 256 setting and 96 which is something I usually set. But really don’t have a clue how much server can grant (how can I test or where to see it?), because it has never been an issue for me. This is the first time when server can’t cope with the needs.

    Same problem here. Have not had any problems before with other hosts. Don’t know how much memory was available there, but on this one I get the same error with text “67108864 bytes exhausted”. I have set in Wordfence Options maximum available 24, but still get the same error. Tried wordfence.5.1.4.zip still the same problem.

    This is something a lot of people have been waiting for. I somehow managed it myself a while ago, but this is much better. Works for me, except when it has been ticked “Hide URL language information for default language”. If we could fix that, it would be awesome and author should definitely think about implementing something like this in the core code.

    Thread Starter aigarinsh

    (@aigarinsh)

    OK I managed it myself with an ugly solution which wouldn’t work for the main language version where there is no langauge slug if you moved to other country code top-level domain as .lv But for the current situation I can live with that.

    Here is the code:

    add_filter('pll_the_languages', 'bk_ln_slugs', 10);
    function bk_ln_slugs($output) {
      $output = str_replace('.lv/menu-categories','.lv/menu-kategorijas', $output);
      $output = str_replace('.lv/меню-категории','.lv/menu-kategorijas', $output);
      $output = str_replace('en/меню-категории','en/menu-categories', $output);
      $output = str_replace('en/menu-kategorijas','en/menu-categories', $output);
      $output = str_replace('ru/menu-categories','ru/меню-категории', $output);
      $output = str_replace('ru/menu-kategorijas','ru/меню-категории', $output);
      return $output;
    }

    Code got messed up with
    , so here I post again:

    function register_my_cpt() {
    	$labels = array(
    		...
    	);
    	$args = array(
    		'labels'		=> $labels,
    		'public'		=> true,
    		'menu_position'	=> 5,
    		'supports'		=> array( 'title', 'editor', 'thumbnail' ),
    		'has_archive'	=> true,
    		'rewrite'		=> array( 'slug' => 'my_cpt_slug' )
    	);
    	register_post_type( 'my_cpt', $args );
    }
    
    function register_my_taxonomy() {
    	$labels = array(
    		...
    	);
    	$cat_slug = get_translated_cat_slug();
    	$args = array(
    		'labels'		=> $labels,
    		'hierarchical'	=> true,
    		'rewrite'		=> array( 'slug' => $cat_slug )
    	);
    	register_taxonomy( 'my_taxonomy', 'my_cpt', $args );
    }
    
    function get_translated_cat_slug() {
    	$current_ln = get_bloginfo('language');
    	if( empty( $current_ln ) ) return 'default_taxonomy';
    	$slugs = array(
    		'lv'	=> 'slug-language-lv',
    		'en-US'	=> 'slug-language-en',
    		'ru-RU'	=> 'slug-language-ru'
    	);
    	return $slugs[$current_ln];
    }

    I agree with everybody on this one. Such a feature would make the plugin almost perfect. I have tried others and qTranslate Slug does it.

    But with it I ran into a problem that it didn’t work on pages as custom post type archives. And the main difference of keeping posts in one or separated depends more on client and website, both versions have bonuses and drawbacks.

    For testing purposes I have managed to use different slugs depending on conditions. And the links in menu appear as I want, but I suppose the rewrite is not happening.

    For example here is how I register my custom taxonomy:

    <br />
    function register_my_cpt() {<br />
    	$labels = array(<br />
    		...<br />
    	);<br />
    	$args = array(<br />
    		'labels'		=> $labels,<br />
    		'public'		=> true,<br />
    		'menu_position'	=> 5,<br />
    		'supports'		=> array( 'title', 'editor', 'thumbnail' ),<br />
    		'has_archive'	=> true,<br />
    		'rewrite'		=> array( 'slug' => 'menu' )<br />
    	);<br />
    	register_post_type( 'my_cpt', $args );<br />
    }</p>
    <p>function register_my_taxonomy() {<br />
    	$labels = array(<br />
    		...<br />
    	);<br />
    	$cat_slug = get_translated_cat_slug();<br />
    	$args = array(<br />
    		'labels'		=> $labels,<br />
    		'hierarchical'	=> true,<br />
    		'rewrite'		=> array( 'slug' => $cat_slug )<br />
    	);<br />
    	register_taxonomy( 'my_taxonomy', 'my_cpt', $args );<br />
    }</p>
    <p>function get_translated_cat_slug() {<br />
    	$current_ln = get_bloginfo('language');<br />
    	if( empty( $current_ln ) ) return 'default_taxonomy';<br />
    	$slugs = array(<br />
    		'lv'	=> 'slug-language-lv',<br />
    		'en-US'	=> 'slug-language-en',<br />
    		'ru-RU'	=> 'slug-language-ru'<br />
    	);<br />
    	return $slugs[$current_ln];<br />
    }<br />

    Not the best solution as it changes also slugs for the links to contents in other languages, but that is just for testing. Anyway, I found out that the slugs of the links changed depending on the condition, but the rewrite doesn’t happen. Why so? The CPT archive page can be accessed with default slug for all languages (en/slug/). When do the rewrite functions take place? And where are they?

    For the current project I could get away even with some hardcoded stuff, but for the future it would be nice to have a place in Admin where you could enter slug translations for all custom post types and taxonomies.

    Same problem here. According to this post https://www.ads-software.com/support/topic/settings-not-saving-3?replies=1 it has not been fixed.

    OK, I got it working this way:
    /wp-content/plugins/theme-my-login/includes/class-theme-my-login-template.php line 331
    esc_html( $link['title'] ) change to
    __(esc_html( $link['title'] ))

    Well, they are not what else can I say. Setting the constant doesn’t change anything. I have it: define(‘WPLANG’, ‘de_DE’);

    Though if I go to /wp-login.php then there all is correct in German. And actually I’m not worried about backend, but the frontend.

    ps. I’m using the qTranslate plugin

    Hi! I might be having the same problem and version is 6.36

    Everything gets translated except Action links under login fields, like “Lost Password” or “Log In” which come from $template->the_action_links( array( 'login' => false ) )

    I see that it is getting the text from WP core language files, but why not for “Lost Password” or “Log In”? I have checked the German translation file (it is WP official de_DE file ) and it has these strings. In Poedit it is 100% translated. Any ideas?

    Also can I replace for example $title = __( 'Lost Password' ) with $title = __( 'Lost Password', 'theme-my-login' ) in class-theme-my-login-template.php to make it use theme-my-login-de_DE.mo instead of WP core translations.

    And I suppose that /wp-content/languages/theme-my-login/theme-my-login-de_DE.mo is now correct path tho this file or am I wrong?

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