Filenames to latin

WordPress Filenames to latin plugin

Plugin helps you convert cyrillic (russian, ukrainian, belorussian), german, polish, spanish and other filenames to latin in your media library during upload.

List of sanitizing letters: а б в г д е ж з и й к л м н о п р с т у ф х ц ч ш щ ь ю я ґ є і ї ё ы ъ э ў ą ć ę ł ń ó ś ź ż à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö × ø ù ú û ü ý þ ÿ ß.

Convert filenames to lowercase automatically.

View source of the filenames to latin plugin.

VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

5 thoughts on “Filenames to latin

  1. :) I found the cheese ! :)

    question: - would you build a plugin from its source code?
    "

    function correctFileName($string) // Remove accents, swap space.

    {

    // change accents to latin http://weblabor.hu/levlistak/wl-phplista/2006/08/051534

    $accentuatedLetters = array('é' => 'e', 'á' => 'a', 'u' => 'u', 'o' =>
    'o', 'ú' => 'u', 'ö' => 'o', 'ü' => 'u', 'ó' => 'o');

    foreach ($accentuatedLetters as $key => $value)

    {

    $string = str_replace($key, $value, $string);

    }

    // Space removal

    $string = str_replace(' ', '_', $string);

    // make lowercase

    $string = strtolower($string);

    return $string;

    }

    "

    Thx, Zoltan

    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
    • These letters (éáuoúöüó) are already sanitizing into their latin analogs as you wrote.
      You may download and test plugin with different filenames and please write ma back if you will find a bug.

      VN:F [1.9.17_1161]
      Rating: 0 (from 0 votes)
  2. Hey.

    I only read yet, but I will love it I guess :)

    A question - your plug-in could remove or change the "spaces" in the filenames to dash or underscore, and make them lowercase?

    eg.:
    " idiot Windows FILEnames.jpg "
    -->
    "nice_windows-filenames.jpg"

    Thx, Zoltan

    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
    • " idiot Windows FILEnames.jpg " will become "idiot-windows-filenames.jpg". So the spaces will be replaced with dashes "-" and filename will be lowercased.

      VN:F [1.9.17_1161]
      Rating: 0 (from 0 votes)
  3. Pingback: Unable to perform Translation:Quota Exceeded. Please see http://code.google.com/apis/language/translate/overview.html - CyberMaster

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">