Search

Hi,

I have started using the Members extension with the Members Forms utilities. I have translated the messages in the Members Forms utilities but, there are still some expressions that are not translated (I guess they come from the Members extension itself.) Looking at this extension I found some language files but not for French. It is not a real trouble to make a French file as it is not that long. Nevertheless, I wonder how to activate a language in this extension?

As far as I know, any extension should use the same language (if available) which you have chosen as default language for your website. If a Symphony author chooses a different language for his account, then the extension should follow. (Other Symphony power users might prove me wrong, this is from the top of my head…)

Regarding Members Forms: Can you give an example of what goes wrong? I vaguely remember that Members Forms might not be up to date with the latest Members extension, and I intend to fix this when I find the time. So an example would be nice.

Thank you Michael-e.

I probably didn't pay attention to the language when installing. Generally I don't mind having the backend in English. I just want the frontend to be in French. I will reinstall on a trial site to see where this choice is to be done because I don't remember making it. By the way, is there a mean to change the language after install?

Regarding examples:

  1. When registering: "Adresse électronique is already taken" instead of "L'adresse électronique est déjà utilisée" (Password already taken)
  2. When logging: "Member not found" instead of "Pas de membre avec cet identifiant" or "Invalid Mot de passe" instead of "Mot de passe non valable" (Invalid password)

All messages are in the members.config.xsl file, a german translation is here, it would be great to have a french translation added!

@vincentd is right, it shouldn't be an issue to use a config file in order to translate default (English) messages to French.

Hi guys, I already translated this file. It provides translation for almost every messages. Nevertheless, there still are some of them which are not translated. I guess they come directly from Members not from the Members-forms. In the Members extension I found a lang folder with various language files. So I added a French one but I cannot make out how to activate it. If you could answer this question I would be glad.

Puuuh, there are some experts here for multi-lingual setups, but I am not experienced with it.

Anyway, using Members Forms should be the simplest and safest way to have French messages in the frontend. I don't understand why Members Forms doesn't translate the messages that you mentioned. It should! Can you attach your config file to your answer, so I can take a look?

Here is the file.

http://paste.pound-python.org/show/PaYIsx22a929QEZozdHz/

but the messages are not inside, for example:

When registering: "Adresse électronique is already taken" instead of "L'adresse électronique est déjà utilisée" (Password already taken)
When logging: "Member not found" instead of "Pas de membre avec cet identifiant" or "Invalid Mot de passe" instead of "Mot de passe non valable" (Invalid password)

I am afraid you did it wrong.

Please take a look at the German example file which comes with Members Forms (in the examples folder). You will find, for example:

<benutzername type="missing" message="Benutzername is a required field.">Benutzername ist ein Pflichtfeld.</benutzername>

This means:

  • The nodename is your field's node name.
  • The English message remains in the message attribute
  • The translation is the node's value

I think the best idea is to copy the German example file and change everything that is NOT English (=German) to French. (And change the node names, of course.)

Hi michael-e,

I have been fighting for hours but I cannot manage to have things 100% working.

The nodename is your field's node name.

Ok for this. I understand.

The English message remains in the message attribute

This I undertand also. But looking at the german file I can see

See german-excerpt.txt              

It doesn't seem that this complies with your direction. Moreover doing that way, all my messages appear twice.Thus I decided to remove the duplication and the messages appeared only once. I tried to stick to your direction keeping the english message only changing the field label. I am not very far from success as my messages seem correct (they are displayed in French including the ones that were not yesterday). Nevertheless, I face trouble when activating the account. I don't understand why. Using the file I sent you yesterday it works (only the messages are not correctly translated.

Here is the new file:

Attachments:
german-exerpt.txt and members.config.xsl.new

Eventually I made it out. The error was here:

<field type="identity" link="identifiant"/>

instead of

<field type="identity" link="username"/>

I will test the messages in context then I will transmit you the French translation for addition in the package.

Those messages appear twice (English/German) in my version because I wanted to be prepared if an admin switches Symphony's default language to German without overlooking the consequencies. In this case Members would throw German messages to the frontend, which are still "translated" by my config file for the sake of consistency.

As long as there is no french language file for Members, your language file for Members Forms doesn't need to include this sort of "repetition", because the above can not happen.

OK. I am testing the message in every situation and try to improve them. There is one I have trouble seeing in which context it appears and what it means. It is:

Hello! You know you should not do that!

I am not sure but it s probably displayed when the member role doesn't allow the event.

A similar message is in the <events> section of the Members Forms config file. In the English version of the file (members.config.en.xsl) you will find the follwoing, two times:

<filter handle="permission">
    <messages>
        <passed/>
        <error><p>Hello? You know that you must not do this!</p></error>
    </messages>
</filter>

In the German example file you will find:

<filter handle="permission">
    <messages>
        <passed/>
        <failed><p>Hallo? Sie wissen doch wohl, dass Sie das nicht dürfen!</p></failed>
    </messages>
</filter>

You should have something similar in your French file!

Sure! But my question — probably wrongly formulated — was about the circumstances in which such a message appears. According to the filter's handle it seems that it is a matter of permission. That is also what vincentd suggest. But it seems to me that this message appears in situations where it should not. The trouble I have is to retrieve when an where.

Ah, sorry for the misunderstanding. Like @vincentd said, this "permissions" filter error will be thrown by the Members extension if the current Member role is not allowed to create/edit using an event, based on the settings in the Symphony backend (System > Member Roles). Have you checked these settings? (I am not aware of any "uncontrolled" behaviour in this repect.)

Don't be sorry. You are kind enough to waste your time answering me.

At the time being I have only 2 roles: public and membre. A visitor that creates an account becomes membre by default. Both roles have Create New (with Edit own) allowed. When completing the register form, the translation of the message "Hello! You know that you must not do that!" appears when:

  • The password is too short
  • Password and confirmation mismatch
  • E-mail contains invalid chars

It doesn't seem to be related with permission. Nevertheless, one could accept to be told he must not mistake.

Did you check if Lock role and Lock activation are in the event Create new (member I assume)? Perhaps the error message you get is about that. When member edit their own profile only lock role is mandatory, for creation, lock activation too. I think.

Small tip, if you want to avoid the password confirmation, you can use jQuery to populate the password confirm field with the value of password field:

$("#id-of-field-password").focusout(function() {
    var password = $("#id-of-field-password").val();
    $("#id-of-field-password-confirm").val(password);
});

And hide password confirm field using css. This is off topic, sorry for that.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details