Title: [Plugin: Comprehensive Google Map Plugin] i18n code flawed
Last modified: August 20, 2016

---

# [Plugin: Comprehensive Google Map Plugin] i18n code flawed

 *  [med_freeman](https://wordpress.org/support/users/med_freeman/)
 * (@med_freeman)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-comprehensive-google-map-plugin-i18n-code-flawed/)
 * plugin v.7.0.23
 * Hi,
    I really appreciate this plugin, and all the work you’ve done.
 * However, a few days ago, i needed to use it for a french language site.
    Just
   to find the language code is not ready for use.
 * So i made the necessary modifications.
    Since i had no time at the moment, i 
   didn’t post it here.
 * And then today applied this plugin update, and #*&ç% lost it all
    So i did it
   a second time this afternoon, et voila…
 * I made an updated archive with the corrections + .pot + french translation, and
   a diff file (in html with colors), so you can see the changes.
 * Can you give me your email, i’ll send you the files?
 * Thanks
 * Notes:
    – Added `cgmp_load_plugin_textdomain` to init action hook in `cgmp_add_actions`–
   Changed the path used in `load_plugin_textdomain` (was `dirname(CGMP_PLUGIN_BOOTSTRAP)`),
   because it has to be relative to `WP_PLUGIN_DIR` (replaced by `plugin_basename(
   __FILE__ )`) – Changed every `__` function occurence to add the second argument(
   the textdomain), `CGMP_NAME` – Added a short json encoding function that escapes
   special characters before outputting the json to the HTML page (French contains
   a lot of single quotes that triggered an error the second i tried the translation
   live).
 * Voila !
 * [http://wordpress.org/extend/plugins/comprehensive-google-map-plugin/](http://wordpress.org/extend/plugins/comprehensive-google-map-plugin/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [med_freeman](https://wordpress.org/support/users/med_freeman/)
 * (@med_freeman)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-comprehensive-google-map-plugin-i18n-code-flawed/#post-2644211)
 * Oh BTW i’m not sure my encoding function covers all the cases (other languages
   special chars ??), perhaps you could use json_encode with the new parameter $
   options …
 * just a suggestion
 *  Thread Starter [med_freeman](https://wordpress.org/support/users/med_freeman/)
 * (@med_freeman)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-comprehensive-google-map-plugin-i18n-code-flawed/#post-2644213)
 * There’s also an error in assets/js/cgmp.framework.js line 530 & 539, where the
   text isn’t translated :
 * `$(dirDivId + ' button#d_sub').removeAttr('disabled').html("Get directions");`
 * Thanks
 *  Plugin Contributor [alexanderzagniotov](https://wordpress.org/support/users/alexanderzagniotov/)
 * (@alexanderzagniotov)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-comprehensive-google-map-plugin-i18n-code-flawed/#post-2644342)
 * Hi,
 * Thank you… Please send me the files for review..
    Azagniotov -at- gmail Regards

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Comprehensive Google Map Plugin] i18n code flawed’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/comprehensive-google-map-plugin_e2e4ef.
   svg)
 * [Comprehensive Google Map Plugin](https://wordpress.org/plugins/comprehensive-google-map-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/comprehensive-google-map-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/comprehensive-google-map-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/comprehensive-google-map-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/comprehensive-google-map-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/comprehensive-google-map-plugin/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [alexanderzagniotov](https://wordpress.org/support/users/alexanderzagniotov/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-comprehensive-google-map-plugin-i18n-code-flawed/#post-2644342)
 * Status: not resolved