Multilanguage awareness

Mar 11, 2009 at 12:39 PM
Are there plans to make the project aware of multiple languages?

Now the language folder (1033) is hardcoded in the source. This needs to be changed to allow the installation of the theme in an other language. Defining a wrong language code will break a lot of stuff. The code could be improved with some checking if the XmlFiles do exist (mainly the xml file SPTHEMES.XML, which may not be found when a non exsisting language code in specified)

Probably the most easy method is to make the language code not a static string (line 94 of FeatureThemeJob.cs) but also make it a property in feature.xml
Coordinator
Mar 19, 2009 at 12:58 AM
Good idea! I'll grab a language pack and see what I can come up with.

Thanks ~
Keith
Jun 1, 2009 at 6:27 PM

I ran into the same issue, needed to update spthemes.xml for english and spanish. This seems to be working well for me:

 

    string[] languageList = new string[2]{@"TEMPLATE\LAYOUTS\1033\SPTHEMES.XML",@"TEMPLATE\LAYOUTS\3082\SPTHEMES.XML"};
    public override void Execute(Guid targetInstanceId)
    {
        foreach (string language in languageList)
        {
            DoMerge(SPUtility.GetGenericSetupPath(language), ThemesFilePath);
        }
    }

 

OK Keith now I need your help with scoping the profile redirect :D

Jul 23, 2009 at 8:09 AM

I had the same issue and made the following changes to the code. It is similar to the solution mentioned above but perhaps somewhat more clear:

In this case we wanted the theme to be available for the english and dutch language.

 

 

private const string SPTHEMES_PATH1043 = @"TEMPLATE\LAYOUTS\1043\SPTHEMES.XML";
    private const string SPTHEMES_PATH = @"TEMPLATE\LAYOUTS\1033\SPTHEMES.XML";
    public override void Execute(Guid targetInstanceId)
    {
      
        DoMerge(SPUtility.GetGenericSetupPath(SPTHEMES_PATH), ThemesFilePath); 
        DoMerge(SPUtility.GetGenericSetupPath(SPTHEMES_PATH1043), ThemesFilePath);
    }

private const string SPTHEMES_PATH1043 = @"TEMPLATE\LAYOUTS\1043\SPTHEMES.XML";

    private const string SPTHEMES_PATH = @"TEMPLATE\LAYOUTS\1033\SPTHEMES.XML";

    public override void Execute(Guid targetInstanceId)

    {

 

        DoMerge(SPUtility.GetGenericSetupPath(SPTHEMES_PATH), ThemesFilePath); 

        DoMerge(SPUtility.GetGenericSetupPath(SPTHEMES_PATH1043), ThemesFilePath);

    }