Create Locales On Google Cloud Platform [PHP]

31 views
Skip to first unread message

Mandeep Kaur

unread,
Sep 8, 2017, 7:08:11 AM9/8/17
to Google App Engine
Hello,

I am trying to implement I18n translation (using PHP gettext) on my website which is deployed on Google Cloud.

I have Implemented the translation using gettext on localhost by configuring locales through command line (ubuntu) and its working fine there. But when I upload, it becomes idle and does not perform any translation.

For enabling gettext extension I have externally included the gettext library in the code.
Please answer to my queries as follows:
    1. What is the way to configure locales on Google Cloud Datastore?
    2. If the above can not happen then what is the way to perform I18n translation.

Thanks!

Yannick (Cloud Platform Support)

unread,
Sep 8, 2017, 10:03:42 AM9/8/17
to Google App Engine
Hello Mandeep,

The PHP Runtime has a number of dynamically loadable extensions, one of which being the intl extension which should suit your needs.

As for "the way to configure locales" on Datastore, there is no built-in functionality specific to locales so you are free to choose your implementation. You could have each locale be represented by its own kind, you could use a field in entities of a kind to differentiate between locales or you could even use namespaces.
Reply all
Reply to author
Forward
0 new messages