Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. [Localizable(true)]

[Localizable(true)]

Scheduled Pinned Locked Moved C#
helptutorialquestionlearning
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Soundman32 2
    wrote on last edited by
    #1

    I have a class property that I want to be localisable. The MSDN gives an example as: [ Description ( "The name of this section" ), Category ( "Section" ), DisplayName ( "Section name" ), Localizable ( true ) ] public int MyProperty { get { // Insert code here. return 0; } set { // Insert code here. } } The help files say

    When code is generated for a component, members that are marked with the
    LocalizableAttribute set to true have their property values saved in resource
    files. You can localize these resource files without modifying the code.

    So I would expect all the attributes to appear in the .resx file, but they don't. Is this a bug, or am I doing something wrong?

    R 1 Reply Last reply
    0
    • S Soundman32 2

      I have a class property that I want to be localisable. The MSDN gives an example as: [ Description ( "The name of this section" ), Category ( "Section" ), DisplayName ( "Section name" ), Localizable ( true ) ] public int MyProperty { get { // Insert code here. return 0; } set { // Insert code here. } } The help files say

      When code is generated for a component, members that are marked with the
      LocalizableAttribute set to true have their property values saved in resource
      files. You can localize these resource files without modifying the code.

      So I would expect all the attributes to appear in the .resx file, but they don't. Is this a bug, or am I doing something wrong?

      R Offline
      R Offline
      Robert Rohde
      wrote on last edited by
      #2

      I think you must also set Localizable of the Form the control is placed on also to true.

      S 1 Reply Last reply
      0
      • R Robert Rohde

        I think you must also set Localizable of the Form the control is placed on also to true.

        S Offline
        S Offline
        Soundman32 2
        wrote on last edited by
        #3

        The class isn't on a form. It's just a holder for information that can be used by PropertyGrid.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups