Month variable in Polish language

#391696
  • Resolved Matt
    Rank Math free

    Hi,

    I use current month variable (%currentyear%) in my WordPress bit in Polish language (pl_PL) in my WP install, the months names start with lowercase (e.g. “maj” instead of “Maj”). How to fix that?

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.

    Unfortunately, doesn’t have control over the translation of the month. You may need to create your own custom variable and return it after using ucwords() function which is a PHP function.

    Please try the filter below and use the shortcode %shortcode_var_name%:

    add_action( 'rank_math/vars/register_extra_replacements', function(){
    	rank_math_register_var_replacement(
    	   'shortcode_var_name', [
    	   'name'        => esc_html__( 'VAR name', 'rank-math' ),
    	   'description' => esc_html__( 'VAR description', 'rank-math' ),
    	   'variable'    => 'shortcode_var_name',
    	   'example'     => shortcode_var_name_call_back(),
    	   ],
    	   'shortcode_var_name_call_back'
       );
    });
    function shortcode_var_name_call_back(){
    	return "YOUR VARIABLE VALUE";
    }

    Please note that this is just a placeholder code. You still need to modify this code to achieve the desired logic which is now out of our scope of support.

    You would need to return the details of the attribute under the function shortcode_var_name_call_back.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Month variable in Polish language’ is closed to new replies.