Details

    • Affected Branches:
      MOODLE_10_STABLE
    • Fixed Branches:
      MOODLE_10_STABLE
    • Rank:
      21006

      Description

      Related documentation: http://docs.moodle.org/en/Development:Mobile_app#Internationalization

      We need to define how we internationalize the application. Most likely a recommended way of coding needs to be defined before starting any code so all internationalizaton process get easier afterward.

        Activity

        Hide
        Jérôme Mouneyrac added a comment - - edited

        We can internationalize:

        • images
        • nib
        • string in the code

        When you test, think about:

        • clean build
        • reset the simulator
          Otherwise you will not see the changes during your tests as the simulator caches the strings.

        To internationalize string in the code:

        NSLocalizedString(@"sitename", "site name");
        
        • Then in a Terminal: genstrings ./Moodle/*.m
        • Add the generated Localizable.strings to xcode, keep the UTF-16 format.
        • Select the file in xcode4, in the file inspector, you can add new Localization language.
        Show
        Jérôme Mouneyrac added a comment - - edited We can internationalize: images nib string in the code When you test, think about: clean build reset the simulator Otherwise you will not see the changes during your tests as the simulator caches the strings. To internationalize string in the code: NSLocalizedString(@ "sitename" , "site name" ); Then in a Terminal: genstrings ./Moodle/*.m Add the generated Localizable.strings to xcode, keep the UTF-16 format. Select the file in xcode4, in the file inspector, you can add new Localization language.
        Hide
        Jérôme Mouneyrac added a comment -

        To internationalize with a param in your code:

        [NSString stringWithFormat:NSLocalizedString(@"sitename", @"Site name"), @"Moodle.org"];
        

        in the language file:

        "sitename" = "Site Name: %@";
        
        Show
        Jérôme Mouneyrac added a comment - To internationalize with a param in your code: [NSString stringWithFormat:NSLocalizedString(@ "sitename" , @ "Site name" ), @ "Moodle.org" ]; in the language file: "sitename" = "Site Name: %@" ;

          People

          • Assignee:
            Jérôme Mouneyrac
            Reporter:
            Jérôme Mouneyrac
            Participants:
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development