Okay
  Public Ticket #4557822
Event Import and "Multilingual Support"
Open

Comments

  • dano106 started the conversation

    Your plugin is great! I had some questions and would appreciate any guidance you can provide:

    1. Event Import Functionality

    • How are images handled during import? Can they be uploaded to the media library and then linked? If so, is there a recommended image size?

    2. Multilingual Support & Workflow

    When Multilingual Support is enabled, creating a calendar category in one language doesn’t seem to link to its translated counterpart, but instead creates a new category and ID.

    • Is there a way to display all language categories during event entry or category management on the back end view? Currently, I can only add categories when WordPress is set to the corresponding language. This makes it difficult to assign multiple language tags to the same event without switching back and forth between languages.
    • For the Category Import/Export function, is there a column for “language code” to better manage translations?

    Thanks in advance for your help!

  • dano106 replied

    Edited original question.

  •  1,004
    Zhivko replied

    Yes, images can be uploaded to WordPress Media Library during CSV import if the "Download images" option is enabled in the import screen.

    With that option enabled, the importer downloads each image URL, creates a WP attachment, and stores its attachment ID on the event (so it can be treated like a local media item).
    If "Download images" is disabled, the importer keeps the image data/URLs from the CSV as-is (no media-library upload).

    There is no hardcoded recommended pixel size. I guess for full image size something like 1200px-1600px is more than enough.

    ---

    Is there a way to display all language categories during event entry or category management on the back end view?

    - Yes, set the language switcher to "All Languages".

    - CSV Import/Export doesn't have language code field by default but you can add it via hook:

    add_filter('stec_csv_term_assoc_fields', function ($term_assoc_fields) {
    
        if (!is_array($term_assoc_fields)) {
            return $term_assoc_fields;
        }
    
        foreach ($term_assoc_fields as $field) {
            if (isset($field['id']) && $field['id'] === 'lang') {
                return $term_assoc_fields;
            }
        }
    
        $term_assoc_fields[] = array(
            'enabled'  => true,
            'field'    => 'Language code',
            'id'       => 'lang',
            'meta'     => true,
            'single'   => true,
            'taxonomy' => array('stec_cal', 'stec_cat', 'stec_loc', 'stec_org', 'stec_gst'),
        );
    
        return $term_assoc_fields;
    });

    This will add "Language code" field in the csv files

     


    Stachethemes Developer

  • dano106 replied

    Thanks for your reply. I’ll be testing the provided hook shortly.

    To clarify my multilingual question:

    • In the backend, when multilingual mode is enabled, I was hoping for a way to assign category/location tags regardless of language to can tag events with both English + Spanish tags. Currently that does not seem possible without switching the WordPress language or disabling multilingual mode. I understand tags are restricted to the active language for user front-end entry, but I was hoping to bypass that limitation in the backend. 
    • Currently, I don’t see a language switcher for “All Languages” on event/category creation pages. I think the screenshots help explain a bit better.

    Separately, regarding imports:

    • Will Event imports with unmatched Categories automatically create the Category or must it exist prior to import? I could later update the respective Category language manually.
    • Is there a way to import CSVs from a specific file location via CRON job (like ics) or trigger them through an external API? This would be so helpful to streamline bulk updates. 

    Thanks again for your help!

  • dano106 replied

    In this example, I was hoping to see all three listed.

    Attached files:  ES WP Setting.png
      ES Event Creation.png
      EN Event Creation.png
      EN WP Setting.png

  • dano106 replied

    @Zhivko, Would it be possible to please get an update on this issue from last week?

  •  1,004
    Zhivko replied

    To see all items regardless of their language change the language switcher at the top to "All Languages":

    3180515921.png

    Will Event imports with unmatched Categories automatically create the Category or must it exist prior to import?

    No. Event CSV import does not auto-create missing Categories.
    The Category must exist before import, otherwise that category is skipped.

    Is there a way to import CSVs from a specific file location via CRON job (like ics) or trigger them through an external API?

    No, that functionality is only supported for ICS imports only.


    Stachethemes Developer