• Resolved gstar

    (@gstar)


    I am trying to change the words from a file to show capitalized by words, using:

    You can use the ucwords() and strtolower() functions for this. For example:

    [ucwords(strtolower({title[1]}))]

    This works on most words except for those with accents.

    So CÁPSULAS turns into CÁpsulas while it should be Cápsulas.

    Any idea how to fix this?

Viewing 1 replies (of 1 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @gstar

    This works on most words except for those with accents.

    You can write a custom function that uses mb_convert_case() for this. Example:

    function my_convert_words( $words ) {
    	return mb_convert_case( $words, MB_CASE_TITLE,"UTF-8" );
    }
Viewing 1 replies (of 1 total)

The topic ‘Capitalize Words’ is closed to new replies.