How to convert the prefecture name of OrderPrinter to Japanese
Everyone's favorite "OrderPrinter" is synonymous with delivery note printing app that silences crying children
There is a charm point that only the prefecture name cannot be displayed in Japanese for Japanese addresses. Therefore, I wrote conditional sentences for all 47 prefectures in the template.
Paste the following code where you want to display the prefecture name in the template
{% case shipping_address.province_code %} {% when 'JP-01' %}北海道{% when 'JP-02' %}青森県{% when 'JP-03' %}岩手県{% when 'JP-04' %}宮城県{% when 'JP-05' %}秋田県{% when 'JP-06' %}山形県{% when 'JP-07' %}福島県{% when 'JP-08' %}茨城県{% when 'JP-09' %}栃木県{% when 'JP-10' %}群馬県{% when 'JP-11' %}埼玉県{% when 'JP-12' %}千葉県{% when 'JP-13' %}東京都{% when 'JP-14' %}神奈川県{% when 'JP-15' %}新潟県{% when 'JP-16' %}富山県{% when 'JP-17' %}石川県{% when 'JP-18' %}福井県{% when 'JP-19' %}山梨県{% when 'JP-20' %}長野県{% when 'JP-21' %}岐阜県{% when 'JP-22' %}静岡県{% when 'JP-23' %}愛知県{% when 'JP-24' %}三重県{% when 'JP-25' %}滋賀県{% when 'JP-26' %}京都府{% when 'JP-27' %}大阪府{% when 'JP-28' %}兵庫県{% when 'JP-29' %}奈良県{% when 'JP-30' %}和歌山県{% when 'JP-31' %}鳥取県{% when 'JP-32' %}島根県{% when 'JP-33' %}岡山県{% when 'JP-34' %}広島県{% when 'JP-35' %}山口県{% when 'JP-36' %}徳島県{% when 'JP-37' %}香川県{% when 'JP-38' %}愛媛県{% when 'JP-39' %}高知県{% when 'JP-40' %}福岡県{% when 'JP-41' %}佐賀県{% when 'JP-42' %}長崎県{% when 'JP-43' %}熊本県{% when 'JP-44' %}大分県{% when 'JP-45' %}宮崎県{% when 'JP-46' %}鹿児島県{% when 'JP-47' %}沖縄県{% endcase %}