https://twill.io logo
Join Discord
Powered by
# 🗺i18n
  • d

    Depka

    01/31/2022, 5:12 PM
    Hi can, someone please guide me how to create translation PR for Czech language ? code cs O:) i'd love to do the translation and help somehow :)
  • k

    kalle

    01/31/2022, 5:15 PM
    All steps provided here https://github.com/area17/twill/blob/2.x/lang/en/lang.php
  • d

    Depka

    01/31/2022, 5:26 PM
    perfect thank you :)
  • d

    Depka

    01/31/2022, 5:45 PM
    @User i understand that i need to fork twill repo, but since there is mentioned to use artisan command i need to do that in some laravel project with twill and copy changed files to forked repo right ?
  • i

    ifox

    01/31/2022, 6:11 PM
    correct, @User
  • i

    ifox

    01/31/2022, 6:12 PM
    we could find a way to run it from Twill itself but ultimately you're always using Twill in a Laravel project
  • i

    ifox

    01/31/2022, 6:13 PM
    you can do the changes locally use the GitHub UI directly to submit the new lang file too, you don't have to update the CSV in the PR, we can do it when merging.
  • d

    Depka

    01/31/2022, 6:19 PM
    so you ultimately need only the csv right ? :)
  • i

    ifox

    01/31/2022, 6:19 PM
    no, the PHP file
  • i

    ifox

    01/31/2022, 6:19 PM
    The CSV is for convenience
  • i

    ifox

    01/31/2022, 6:20 PM
    If you want to work within it feel free to PR the CSV and we can generate the PHP, the command works both ways
  • d

    Depka

    01/31/2022, 6:23 PM
    ok thank you :) i'll get right into it :)
  • d

    Depka

    01/31/2022, 6:43 PM
    omg i see it's already translated :D sorry for bothering :) I'll try to at least translate the few rest on the end :)
  • s

    Sami

    09/09/2022, 11:59 AM
    Hello, can I override some translations? I tried overriding the file as mentioned here https://discord.com/channels/811936425858695198/831314376786837515/883301869852708875 but changes don't show. I changed
    lang.csv
    (and used the
    twill:lang
    command) and then new translations showed up. But how can I override it from locally from the project? 🤔
  • i

    ifox

    09/10/2022, 10:15 AM
    Hi @Sami it should be
    resources/lang/vendor/twill/en/lang.php
  • s

    Sami

    09/10/2022, 2:50 PM
    thanks, I checked again (the path was correct) and I didn't realise the file needs to return all the translations instead of only the changed keys. Thanks for ensuring me I was on the right path!
  • a

    alitak

    11/22/2022, 11:15 AM
    hi, is there any way to add translations to the media library? Now i can add alt text and caption to images, but can i add these informations per language?
  • i

    ifox

    11/22/2022, 11:21 AM
    Hi @alitak there is a config for that! Set
    twill.media_library.translatable_metadatas_fields
    to
    ['caption', 'alt_text']
    .
  • a

    alitak

    11/22/2022, 11:24 AM
    wow, that is amazing, thank you!
  • a

    alitak

    11/22/2022, 11:34 AM
    is there anything else which i should set? Now i have fields for all languages, but I can only save one of them. If i fill the english alt text, it stores to the db, but if i change other language, it will kick out the english version
  • i

    ifox

    11/22/2022, 11:37 AM
    hmm that's not normal
  • a

    alitak

    11/22/2022, 11:39 AM
    should the ajax send other data too?
  • i

    ifox

    11/22/2022, 11:40 AM
    it should send all languages in the object
  • i

    ifox

    11/22/2022, 11:41 AM
    can you try enabling
    twill.media_library.translated_form_fields
    ? It's a boolean
  • a

    alitak

    11/22/2022, 11:59 AM
    i set it to true, but nothing changed
  • i

    ifox

    11/22/2022, 12:10 PM
    ok, we'll have to check. You're on the latest twill 2?
  • a

    alitak

    11/22/2022, 12:14 PM
    oh, no, sry a forgot to mention, this is the 3 beta
  • a

    alitak

    11/22/2022, 12:14 PM
    Version 3.0.0-beta2
  • i

    ifox

    11/22/2022, 12:18 PM
    Ok thanks! If you have time, please submit an issue on GitHub with those details
  • a

    alitak

    11/22/2022, 12:20 PM
    ok, thank you for your work!