Is hint for translator compulsory while internationalizing a string containing variables?

Question

I am following this official guide to internationalise my plugin. But I am confused if the hints are must required incase of variables inside string?

printf(
    /* translators: 1: Name of a city 2: ZIP code */
    __( 'Your zip code is %2$s, and your city is %1$s.', 'my-plugin' ),
    $city,
    $zipcode
);

Also in this documentation, no where it is mentioned to use load_plugin_textdomain to load the text domain. It is only mentioned about the Domain Path. So can I omit load_plugin_textdomain if I use Domain Path?

0
SkyRar 3 months 0 Answers 17 views 0

Leave an answer