

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
9 messages in org.openoffice.fr.progRe: [prog] Changer la langue locale| From | Sent On | Attachments |
|---|---|---|
| Didier Dorange-Pattoret | Nov 22, 2008 6:40 am | |
| Francois Gatto | Nov 22, 2008 11:02 pm | |
| Didier Dorange-Pattoret | Nov 23, 2008 1:19 pm | |
| Francois Gatto | Nov 23, 2008 10:40 pm | |
| Bernard Marcelly | Nov 24, 2008 3:22 am | |
| Didier Dorange-Pattoret | Nov 24, 2008 4:05 am | |
| Didier Dorange-Pattoret | Nov 24, 2008 4:11 am | |
| Didier Dorange-Pattoret | Nov 24, 2008 4:14 am | |
| Francois Gatto | Nov 24, 2008 10:27 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [prog] Changer la langue locale | Actions... |
|---|---|---|
| From: | Francois Gatto (oo...@volcar.org) | |
| Date: | Nov 22, 2008 11:02:23 pm | |
| List: | org.openoffice.fr.prog | |
Bonjour Didier,
Didier Dorange-Pattoret wrote:
Bonjour,
Je voudrais changer la langue locale d'un compte utilisateur OOo.
J'ai essayé la macro, mais sans succès :
Sub Main oConfigAccess = GetConfigAccess( "/org.openoffice.Setup/L10N", True ) oConfigAccess.ooLocale = "de" oConfigAccess.commitChanges() End Sub
Function GetConfigAccess( ByVal cNodePath As String,ByVal bWriteAccess As Boolean,Optional bEnableSync,Optional bLazyWrite) As Object If IsMissing(bEnableSync) Then bEnableSync = True If IsMissing( bLazyWrite ) Then bLazyWrite = False Dim oConfigProvider, oConfigAccess as Object oConfigProvider = GetProcessServiceManager.createInstanceWithArguments("com.sun.star.configuration.ConfigurationProvider",Array( MakePropertyValue( "enableasync", bEnableSync))) If bWriteAccess Then cServiceName = "com.sun.star.configuration.ConfigurationUpdateAccess" Else cServiceName = "com.sun.star.configuration.ConfigurationAccess" EndIf oConfigAccess = oConfigProvider.createInstanceWithArguments( cServiceName, Array( MakePropertyValue( "nodepath", cNodePath ), MakePropertyValue( "lazywrite", bLazyWrite ))) GetConfigAccess() = oConfigAccess End Function
Didier Dorange-Pattoret www.dmaths.org
Cordialement.
Sur ooo.forum.org la macro suivante, qui semble fonctionner correctement. http://www.oooforum.org/forum/viewtopic.phtml?t=77031&highlight=locale
Sub Snippet_10() Dim oCP As Object Dim oCUA As Object Dim aProps(0) As New com.sun.star.beans.PropertyValue Dim sooSetupCurrency As String Dim sooLocale As String
oCP = CreateUnoService( _ "com.sun.star.configuration.ConfigurationProvider" ) aProps(0).Name = "nodepath" aProps(0).Value = "/org.openoffice.Setup/L10N" oCUA = oCP.createInstanceWithArguments( _ "com.sun.star.configuration.ConfigurationUpdateAccess", aProps )
' change Locale Setting oCUA.setPropertyValue("ooSetupSystemLocale", "es-SV")
' change Default Currency oCUA.setPropertyValue("ooSetupCurrency", "USD-en-US") 'oCUA.setPropertyValue("ooSetupCurrency", "SVC-es-SV")
oCUA.commitChanges() End Sub
Francois Gatto
-- Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org
Rejoignez maintenant plus de 3 000 personnes, associations, entreprises et collectivités qui soutiennent notre action







