Skip to content

Instantly share code, notes, and snippets.

@lucansky
Created February 27, 2014 19:28
Show Gist options
  • Save lucansky/9257323 to your computer and use it in GitHub Desktop.
Save lucansky/9257323 to your computer and use it in GitHub Desktop.
Transliterate all files in current directory
require "find"
require "i18n"
I18n.enforce_available_locales = false
Find.find(".").each do |f|
if FileTest.directory?(f)
next
else
puts "#{f} -> #{I18n.transliterate(f)}"
File.rename(f, I18n.transliterate(f))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment