wix internall strings cannot be localize

后端 未结 1 1133
死守一世寂寞
死守一世寂寞 2021-01-06 09:20

Wix I18n Dev.The version of wixtoolset is V3.7. And the Installer UI is created by UIExtension. In the installation process, there are some UI strings cannot be localized. S

1条回答
  •  别那么骄傲
    2021-01-06 10:09

    I already answered this question here.

    Either read that or check out the paragraph called Progress Bar Messages in Nick Ramirez' book WiX 3.6: A Developer's Guide to Windows.

    The good people of packtpublishing are offering the chapter of his book containing that paragraph for free here:

    Chapter 12: Localizing Your Installer. See page 329.

    Another page of interest is this MSDN article: Standard Actions Reference which is also noted in the book.

    Edit: Because of the comments I will post a working minimal example and a screenshot, so you see that it works:

    
    
        
            
    
            
    
            
                
            
    
        
        
          !(loc.InstallFiles)
          !(loc.CreateShortcuts)
          !(loc.WriteRegistryValues)
          !(loc.WriteRegistryValues)
          !(loc.RegisterProduct)
          !(loc.PublishFeatures)
          !(loc.PublishFeatures)
          !(loc.InstallFinalize)
        
        
        
    
        
            
                
                    
                
            
        
    
        
            
                
            
                
            
        
    
    

    Accompanying this example, you have to have a localisation file for your Culture. You have to set the Culture in the project properties under Build->Cultures to build. In my case I named it es-es.wxl and the file contents follow:

    
    
      Archivo no encontrado: [2]. Compruebe que el archivo existe y que puedes acceder a él.
      Installazione del archivos
      Archivo: [1], Tamaño de archivo: [6], Directorio: [9]
      Creacion de los atajos
      Atajo [1] creado
      Escribir en registro
      Camino: [1], Nombre: [2], valor: [3]
      Registrar a los usuarios
      Usario: [1]
      Registrar producto
      Producto: [1]
      Publicar las características
      Caraterística: [1]
      Publicar el producto
      Producto: [1]
      Finalizar la instalación
      Finalizar [ProductName]
    
    

    Lastly a Screenshot to show you that it works: Image of a localized wix installation with localized progress bar strings.

    Another edit: To localize error strings, you simply have to define Error elements with the corresponding error numbers:

    
        Una parte de la ruta de la carpeta no es válido. Se está vacío o supera la longitud permitida por el sistema.
        !(loc.Error_1311)
    
    

    The first error string is hard-coded, so that's not such a good solution. It's better to use localization files, as it is done in the second Error element.

    0 讨论(0)
提交回复
热议问题