Title: andany's Replies | WordPress.org

---

# andany

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

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

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simple Points and Rewards for WooCommerce - Create a Loyalty Program] Translation problem](https://wordpress.org/support/topic/translation-problem-226/)
 *  Thread Starter [andany](https://wordpress.org/support/users/andany/)
 * (@andany)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/translation-problem-226/#post-18897499)
 * I’ll show you what I changed, then you’ll know what I meant. To solve the first
   problem, I enabled a PHP code snippet. As I said, I need not only “Points” I 
   need “Point” too to display. This is snippet which solves that. This is the snippet
   that solved the first problem.
 *     ```wp-block-code
       add_filter( 'spar_formatted_points_message', 'custom_spar_singular_and_space_fix', 99, 3 );function custom_spar_singular_and_space_fix( $message, $template, $points ) {    // 1. Correct singular    if ( 1 === (int) $points ) {        $message = str_ireplace( array('Punkte', 'Points'), array('Punkt', 'Point'), $message );    }    // 2. Force a space before the link/letter    // Search for the number and add a non-breakable space after it.    $message = preg_replace('/(\d+)\s*/', '$1&nbsp;', $message);        // 3. Price repair (prevents 0.01)    $message = str_replace('&nbsp;,', ',', $message);    return ucfirst( trim($message) );}
       ```
   
 * I only need the first command, but it had to be modified by the second and third
   commands so that it looks like on pictures in the first post.
 * Second problem – To correctly display messages in the cart such as:
 *     ```wp-block-code
       You will earn %1$d %2$s from this order
       ```
   
 *     ```wp-block-code
       You earned %1$d %2$s from this order!
       ```
   
 * I changed all strtolower( $points_label ) to ucfirst( $points_label ) in cart-
   checkout.php. This isn’t the best solution due to updates, but I have no other
   choice. If I solve this with a code snippet, the letters are jumping while the
   AJAX loads. The first image from the first post is incorrect, it’s from the single
   product page and can be changed using points_label and points_label_lower. 
   The
   problem is with pre-existing sentences which explicitly require lowercase in 
   the plugin files.As I already mentioned, this is a great loyalty points plugin,
   but it would need some adjustments for the German language. For example, if someone
   in Croatia wanted to use this plugin, they would have massive difficulties with
   the translation, since they have things like “1 bod,” “2 boda,” “10 bodova,” 
   and they could only use “bodova” translated from English.I hope you now understand
   what I mean, and that’s why the topic title is “Translation problem”.

Viewing 1 replies (of 1 total)