Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

Pawtucket2 multilanguage

Hi. I'm running pawtuket2 commit c7bfdac on 28 Mar 2016

I'm trying to set-up a multi-language or at least a localized environment.
I set:
- in Providence I added it_IT locale;
- In setup.php: define("__CA_DEFAULT_LOCALE__", "it_IT");
- in /app/conf/app.conf : locale_default = it_IT and ui_locales = [en_US,it_IT];
-  I have copied /app/locale/en_US/messages.* to /app/locale/it_IT/messages.* and translated (and compiled) that file in poedit, so I have both .po and .mo files.

But it does not work.

Please help...

Comments

  • Hi gbenigni,

    Are you trying to display the UI in Italian, or are you trying to catalogue in two languages or both?
  • I catalogued in italian language, leaving in Providence en_US as data locale.
    I localized metadata, lists, entities, relations, UIs in Providence for it_IT locale.
    Now I'd like to have a dual language (en and it) pawtucket2, both for interfaces and (when existing) data.

    I read that is possible to set a languiage selector on Pawtucket2, like the one existing in Providence.
  • So the backend is working as you want?  For the front-end: 

    1. In Pawtucket2's local app.conf file, add the option:

    ui_locales = [en_US, it_IT]

    2. In your Pawtucket2 theme, add a folder called locale, and drop the en_US and it_IT local folders there (containing both messages.mo and messages.po for each)


  • Ok. I've been able to change the language.
    But, is there any way to have a language selector i.e. on the top bar?

    Thank you for your help.
  • Yes you can create links such as:

    <li class="lang-en <?php print ($g_ui_locale == 'en_US') ? 'active' : ''; ?>"><?php print caChangeLocaleLink($this->request, 'en_US', '<span>English</span>', 'myClass', ['hreflang' => 'en', 'title' => 'English']); ?></li>

    <li class="lang-it <?php print ($g_ui_locale == 'it_IT') ? 'active' : ''; ?>"><?php print caChangeLocaleLink($this->request, 'it_IT', '<span>Italian</span>', 'myClass', ['hreflang' => 'it', 'title' => 'Italian']); ?></li>
  • edited February 7
    Hello @sophie,
    In which files should we put this kind of links?
    Thank you very much.
  • Hi Margari,

    It would be best put these in your header or footer (located in the pageFormat folder) if you want them to appear on every page. 
Sign In or Register to comment.