Opened 12 years ago
Closed 12 years ago
#24681 closed enhancement (duplicate)
Translating custom image size names
Reported by: | sami.keijonen | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
Should there be parameter in add_image_size for a translated name? Now we need to use image_size_names_choose
hook.
Something like add_image_size( $name, $translated_name, $width, $height, $crop );
Example add_image_size( 'my-thumbnail-portfolio', __( 'My Portfolio thumbnail', 'text-domain' ), 450, 309, true );
I wrote article about it the get the idea why and how to translate custom image sizes now.
Change History (4)
#2
@
12 years ago
Thanks Brian. I wasn't thinking. I was too afraid that my first ticket would blow up WP to a black hole.
#3
@
12 years ago
- Cc daveshine added
Definitely an awesome idea/ enhancement which would have benefits for the end user (think media uploader: real names for added image sizes!) and theme/ plugin devs, as the process of adding the i18n stuff would become much easier and faster, and so hopefully gets implemented in the end!
These are "small details" that matter in user experience!
I think you'd want to add $translated_name as the last parameter for backward compatibility. And you'd need to set a default as well.
In core, I think it'd be more like