[SOLVED] Translation of action names

A place for users and developers of the Xataface to discuss and receive support.

[SOLVED] Translation of action names

Postby cbrunet » Fri Oct 30, 2009 8:13 am

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.
Last edited by cbrunet on Sat Oct 31, 2009 9:30 am, edited 1 time in total.
--
Charles Brunet
http://cbrunet.net
cbrunet
 
Posts: 13
Joined: Tue Aug 19, 2008 7:14 am
Location: Québec, Canada

Postby shannah » Fri Oct 30, 2009 5:32 pm

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?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby cbrunet » Fri Oct 30, 2009 5:57 pm

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.
--
Charles Brunet
http://cbrunet.net
cbrunet
 
Posts: 13
Joined: Tue Aug 19, 2008 7:14 am
Location: Québec, Canada

Postby shannah » Fri Oct 30, 2009 6:05 pm

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby cbrunet » Fri Oct 30, 2009 6:17 pm

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.)
--
Charles Brunet
http://cbrunet.net
cbrunet
 
Posts: 13
Joined: Tue Aug 19, 2008 7:14 am
Location: Québec, Canada

Postby shannah » Fri Oct 30, 2009 7:54 pm

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby cbrunet » Sat Oct 31, 2009 9:30 am

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"
--
Charles Brunet
http://cbrunet.net
cbrunet
 
Posts: 13
Joined: Tue Aug 19, 2008 7:14 am
Location: Québec, Canada


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 16 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved