{"id":1036451,"date":"2015-12-06T08:45:06","date_gmt":"2015-12-06T16:45:06","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/"},"modified":"2015-12-16T15:19:53","modified_gmt":"2015-12-16T23:19:53","slug":"translation-not-working-in-new-event-tickets-plus","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/","title":{"rendered":"Translation not working in new Event Tickets Plus"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I&#8217;ve been testing the new plugin versions on a local testing server and things seem to work OK once I replace template overrides with copies using the new version but I have been unable to make the French translation of the Event Tickets Plus plugin work. All strings always display in English.<\/p>\n<p>I use POEdit and tried updating the translations from the PO files, from source, creating new ones but nothing worked. I always only see the English strings.<\/p>\n<p>Then I started poking in the plugin files to make sure the text domain was correct and nothing else was weird and I found why it didn&#8217;t work.<\/p>\n<p>If you look at the event-tickets-plus.php file at the root of the plugin folder, the only call to load_plugin_textdomain in the entire plugin is on line 43 and that is inside the following conditional: if ( event_tickets_plus_is_incompatible_tickets_core_installed() ) { &#8230;textdomain code }<\/p>\n<p>That event_tickets_plus_is_incompatible_tickets_core_installed() function is defined further down in the same file at line 70. Since I AM using a compatible version, that function always returns &#8220;false&#8221; so the translations are never actually loaded. I removed the above conditional on line 41 (closing at line 47) and the French translation worked right away.<\/p>\n<p>So something is broken with that logic as it seems to be loading the new plugin&#8217;s translation files only if one is running an incompatible version and no other action is taked if the function returns false. In that case, no translations are loaded at all which makes no sense to me.<\/p>\n<p>What&#8217;s up with that? In any case, I&#8217;ll definitely wait before upgrading on the live site until this is resolved.<\/p>\n<p>Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-1036451","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Translation not working in new Event Tickets Plus -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Translation not working in new Event Tickets Plus -\" \/>\n<meta property=\"og:description\" content=\"Hi, I&#8217;ve been testing the new plugin versions on a local testing server and things seem to work OK once I replace template overrides with copies using the new version but I have been unable to make the French translation of the Event Tickets Plus plugin work. All strings always display in English. I use [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-12-16T23:19:53+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/\",\"name\":\"Translation not working in new Event Tickets Plus -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-12-06T16:45:06+00:00\",\"dateModified\":\"2015-12-16T23:19:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Translation not working in new Event Tickets Plus\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Translation not working in new Event Tickets Plus -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/","og_locale":"en_US","og_type":"article","og_title":"Translation not working in new Event Tickets Plus -","og_description":"Hi, I&#8217;ve been testing the new plugin versions on a local testing server and things seem to work OK once I replace template overrides with copies using the new version but I have been unable to make the French translation of the Event Tickets Plus plugin work. All strings always display in English. I use [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/","article_modified_time":"2015-12-16T23:19:53+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/","name":"Translation not working in new Event Tickets Plus -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-12-06T16:45:06+00:00","dateModified":"2015-12-16T23:19:53+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/translation-not-working-in-new-event-tickets-plus\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"Translation not working in new Event Tickets Plus"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1036451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1036451\/revisions"}],"predecessor-version":[{"id":1037163,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1036451\/revisions\/1037163"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1036451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}