Details

    • Affected Branches:
      MOODLE_10_STABLE
    • Fixed Branches:
      MOODLE_10_STABLE

      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            jerome 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
            jerome 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
            jerome 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
            jerome 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:
                jerome Jérôme Mouneyrac
                Reporter:
                jerome Jérôme Mouneyrac
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  1/Jun/11