Page 1 of 1

[SOLVED] Translation of action names

PostPosted: Fri Oct 30, 2009 8:13 am
by cbrunet
Hi,

I'm using Xataface in a French environment. I realized action labels aren't translated, when translations are in the lang/fr.ini file. For example:

actions.browse.label
actions.list.label
actions.find.label
actions.new.label
etc.

How to I translate those items?

Charles.

PostPosted: Fri Oct 30, 2009 5:32 pm
by shannah
Hmm.. strange. Those are the correct keys. I don't know why they wouldn't be getting translated. I'm running a few apps with the french translation (the same one that is bundled with xataface) and it is translating those actions (browse etc..) without difficulty.

What version are you running? Is it picking up other translations?

PostPosted: Fri Oct 30, 2009 5:57 pm
by cbrunet
I'm running Xataface 1.2.2.

In fact, I realize nothing is translated... How should I do to have it in French?

I tried adding

Code: Select all
default_language = fr

[languages]
fr= = "Français"


to my conf.ini file, but it changes nothing... If I add

Code: Select all
multilingual_content = 1


then I get an error Dataface/QueryTranslator.php is not found.

PostPosted: Fri Oct 30, 2009 6:05 pm
by shannah
I believe you need to add the following to your conf.ini file (the beginning of it).

default_language=fr
default_oe=UTF-8
default_id=UTF-8

For multilingual content (e.g. if you want to be able to translate database data you require the query translator extension... you can get it from SVN

http://weblite.ca/svn/dataface/core/tru ... slator.php

-Steve

PostPosted: Fri Oct 30, 2009 6:17 pm
by cbrunet
The default_language doesn't seem to work.

I realized that if I put more than one item into [languages] section, then i can choose the French language.

But I haven't succed having only the interface in French. Also, it seems many strings still show in English ("You are here", "Showing _ Results per page", "Found _ records", "Logged in as _", etc., etc.)

PostPosted: Fri Oct 30, 2009 7:54 pm
by shannah
I apologize for the confusion. I had to try it myself to see what is involved.

You need to have the following at the beginning of your conf.ini file:

languages=fr
default_language=fr
default_oe=utf-8
default_ie=utf-8

And you will need to remove your cookies, as it will override these defaults if your site was already loaded in english.


-Steve

PostPosted: Sat Oct 31, 2009 9:30 am
by cbrunet
Thank you,

it works now!

BTW, here are some missing strings from fr.ini

Code: Select all
Logged in as user = "Connecté en tant que {$username}"
actions.delete_selected.label = "Supprimer"
actions.manage.label = "Panneau de configuration"
actions.my_profile.label = "Mon profil"
scripts.Dataface_FormTool.LABEL_EDIT_DETAILS = "Modifier détails"
scripts.Dataface_QuickForm.LABEL_EDIT_DETAILS = "Modifier détails"
scripts.Dataface_ResultList.MESSAGE_WITH_SELECTED = "Avec la sélection"
scripts.Dataface_SearchForm.LABEL_MATCH_NONE = "Ne pas rechercher items sélectionnés"
scripts.Dataface_SkinTool.LABEL_BREADCRUMB = "Vous êtes ici"
scripts.GLOBAL.LABEL_ADD_ROW = "Ajouter rangée"
scripts.GLOBAL.LABEL_ALL = "Tout"
scripts.GLOBAL.LABEL_DATE_CREATED = "Créé le $created"
scripts.GLOBAL.LABEL_FIND = "Trouver"
scripts.GLOBAL.LABEL_LAST_MODIFIED = "Dernière mise à jour le $last_mod"
scripts.GLOBAL.LABEL_LOGIN = "Connexion"
scripts.GLOBAL.LABEL_LOGOUT = "Déconnexion"
scripts.GLOBAL.LABEL_NEXT = "Suivant"
scripts.GLOBAL.LABEL_PREV = "Précédent"
scripts.GLOBAL.LABEL_SEARCH = "Rechercher"
scripts.GLOBAL.LABEL_SHOWING = "Afficher"
scripts.GLOBAL.MESSAGE_FOUND = "$found enregistrements trouvés"
scripts.GLOBAL.MESSAGE_NO_MATCH = "Aucun enregistrement ne correspond à votre requête."
scripts.GLOBAL.MESSAGE_RESULTS_PER_PAGE = "résultats par page"
scripts.global.MESSAGE_UNKNOWN = "Inconnu"
templates.Dataface_Record.LABEL_CURRENT_RECORD = "Enregistrement courant"