0

I am building a Wordpress site that is going to be multilingual (using WPML) and it will host a ton of resources in multiple languages - from Chinese to Russian to English, etc. We wanted to upload the files using the native languages filename and I was going to add a filter to sanitize_file_name to accomplish this. After some reading, I cannot find a good explanation of why this may not be a good idea.

My question is, why would this not be a good idea? Should I avoid this? What implications would it have if I allowed all characters to be used?

Thanks for your help!

  • sanitize_file_name to what? You said to accomplish this this - what? Uploading different language's filename, to me, is not a problem. But, for critical glyphs like Chinese, Bengali they take more char-space than English, and for large filenames, they can be trimmed to incomplete wordings. But local filenames can be a good plus point for local SEO. – Mayeenul Islam Oct 28 '14 at 13:26
  • @MayeenulIslam I was saying that I was going to add a filter to the sanstize_file_name because as of now, it adds dashes in the place of spaces and specific characters like those of Chinese file names. So, are you saying that it is not necessarily a bad idea? What about for the permalinks? Would it just add % to the characters that it does not recognize? How would that translate? – dericcain Oct 28 '14 at 13:30
  • I think for SEO hyphen is a very good separator and recommended. And I questioned about this sometime. You can avoid 404 for local filenames using a permalink of example.com/id/filename. – Mayeenul Islam Oct 28 '14 at 13:42
  • @MayeenulIslam I am not worried much about SEO since the site is very organizational-centric, but I do appreciate the insight. So, it looks like what I could do is keep the characters for the file names and just use English title for the permalinks with dashes as my separator, which is what I am currently doing. Thanks for your help!!!! – dericcain Oct 28 '14 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.