how to add new language

s - 1 week ago

hi, experts we use the pyrocms3.4, and need to add a new language for the post article. I have configed the locales refering the docs. after config, i can enable the new language in the admin settings, but when i try to creat a new post, it alway crash on the error following:

{% for field in fields %}

{% for field in form.fields.translations(field) %} {{ field.render({'form': form})|raw }} {% endfor %}

{% endfor %} ====== Exeception "An exception has been thrown during the rendering of a template ("An exception has been thrown during the rendering of a template ("An exception has been thrown during the rendering of a template ("An exception has been thrown during the rendering of a template ("An exception has been thrown during the rendering of a template ("Array to string conversion").").").").").

do u guys enconter the same issue? is there a work solution for this issue. Thanks so much.

ryanthompson - 1 week ago

If you need to add a new locale to the system you will need to submit a PR to support it here: https://github.com/anomalylabs/streams-platform/blob/1.3/resources/config/locales.php#L55 at the least. Then you will be able enable it in settings.

Let me know how it works out.

ryanthompson - 1 week ago

Also check this out for translating / contributing translations: https://pyrocms.com/posts/translator-module-v1-0