@@ -204,7 +204,33 @@ RUN groupadd -g 991 -r asterisk && \
204204 sqlite3 \
205205 unixodbc-dev \
206206 freetds-dev \
207- freetds-bin
207+ freetds-bin \
208+ locales \
209+ libicu-dev
210+
211+ # Enable languages for FreePBX UI (all languages from the dropdown menu)
212+ RUN sed -i 's/^# *bg_BG.UTF-8 UTF-8/bg_BG.UTF-8 UTF-8/' /etc/locale.gen && \
213+ sed -i 's/^# *cs_CZ.UTF-8 UTF-8/cs_CZ.UTF-8 UTF-8/' /etc/locale.gen && \
214+ sed -i 's/^# *de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \
215+ sed -i 's/^# *en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
216+ sed -i 's/^# *en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
217+ sed -i 's/^# *es_ES.UTF-8 UTF-8/es_ES.UTF-8 UTF-8/' /etc/locale.gen && \
218+ sed -i 's/^# *fa_IR.UTF-8 UTF-8/fa_IR.UTF-8 UTF-8/' /etc/locale.gen && \
219+ sed -i 's/^# *fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \
220+ sed -i 's/^# *he_IL.UTF-8 UTF-8/he_IL.UTF-8 UTF-8/' /etc/locale.gen && \
221+ sed -i 's/^# *hu_HU.UTF-8 UTF-8/hu_HU.UTF-8 UTF-8/' /etc/locale.gen && \
222+ sed -i 's/^# *it_IT.UTF-8 UTF-8/it_IT.UTF-8 UTF-8/' /etc/locale.gen && \
223+ sed -i 's/^# *ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen && \
224+ sed -i 's/^# *nl_NL.UTF-8 UTF-8/nl_NL.UTF-8 UTF-8/' /etc/locale.gen && \
225+ sed -i 's/^# *pt_BR.UTF-8 UTF-8/pt_BR.UTF-8 UTF-8/' /etc/locale.gen && \
226+ sed -i 's/^# *pt_PT.UTF-8 UTF-8/pt_PT.UTF-8 UTF-8/' /etc/locale.gen && \
227+ sed -i 's/^# *ro_RO.UTF-8 UTF-8/ro_RO.UTF-8 UTF-8/' /etc/locale.gen && \
228+ sed -i 's/^# *ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \
229+ sed -i 's/^# *sv_SE.UTF-8 UTF-8/sv_SE.UTF-8 UTF-8/' /etc/locale.gen && \
230+ sed -i 's/^# *uk_UA.UTF-8 UTF-8/uk_UA.UTF-8 UTF-8/' /etc/locale.gen && \
231+ sed -i 's/^# *vi_VN.UTF-8 UTF-8/vi_VN.UTF-8 UTF-8/' /etc/locale.gen && \
232+ sed -i 's/^# *zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/' /etc/locale.gen && \
233+ locale-gen
208234
209235
210236# Copy Asterisk files
@@ -517,6 +543,7 @@ RUN docker-php-source extract && \
517543 docker-php-ext-configure sockets && docker-php-ext-install sockets && \
518544 docker-php-ext-configure pdo_dblib && docker-php-ext-install pdo_dblib && \
519545 docker-php-ext-configure pdo_pgsql && docker-php-ext-install pdo_pgsql && \
546+ docker-php-ext-configure intl && docker-php-ext-install intl && \
520547 docker-php-source delete
521548
522549# Install nethvoice-wizard-restapi and nethvoice-wizard-ui
@@ -532,6 +559,10 @@ RUN cd /var/www/html/freepbx/rest/ && \
532559 cp -r dist/* /var/www/html/freepbx/wizard/ && \
533560 rm -fr /tmp/wizard
534561
562+ # Compile FreePBX module translation files (.po to .mo)
563+ # Only compile files in proper i18n/LC_MESSAGES directories, skip vendor/test directories
564+ RUN find /var/www/html/freepbx/admin -path "*/i18n/*/LC_MESSAGES/*.po" -exec sh -c 'msgfmt -o "${1%.po}.mo" "$1" 2>/dev/null || true' _ {} \;
565+
535566# enable apache rewrite module
536567RUN a2enmod rewrite proxy*
537568
0 commit comments