Domain based localization in PyroCMS

keevitaja - 2 months ago

I wrote a short tutorial on how to enable domain based locales in pyrocms

https://keevitaja.com/posts/domain-based-localization-in-pyrocms

ryanthompson - 2 months ago

Nice article!

There's been a prototype feature (undocumented cause it's not super well tested) where you can assign domains locale keys in the "core_domains" table. Feel free to test it out and I can document those. But this is a pretty sturdy way of doing things as well! I love seeing people extend the system that's built to extend :-)

Good work!

keevitaja - 2 months ago

There is no core_domains table. But i found following tables:

  • applications_domains
  • applications

Adding locale to applications_domains has no effect:

+----+----------------+-------------+--------+
| id | application_id | domain      | locale |
+----+----------------+-------------+--------+
| 2  | 1              | pyrocms.app | ru     |
+----+----------------+-------------+--------+