Persian Localization Provider for radGridView

5 posts, 0 answers
  1. hosein
    hosein avatar
    42 posts
    Member since:
    Oct 2010

    Posted 16 Feb 2011 Link to this post

    Requirements

    RadControls version Q3.2010
    .NET version
    Visual Studio version 2010
    programming language C#

    PROJECT DESCRIPTION

    This is a Persian Localization provider for radGridView. If you are going to use a right to left RadGridView, you will need to change some texts to show them properly.

    You should copy this code in your form_load event too.

    RadGridLocalizationProvider.CurrentProvider = new PersianRadGridLocalizationProvider();

    I have attached a project with this PersianLocalizationProvider to show how to use it.

    regards

    Hosein

    public class PersianRadGridLocalizationProvider : RadGridLocalizationProvider
        {
            public override string GetLocalizedString(string id)
            {
                switch (id)
                {
                    case RadGridStringId.FilterFunctionBetween: return "???"; //Between  
                    case RadGridStringId.FilterOperatorBetween: return "???";
                    case RadGridStringId.FilterFunctionContains: return "????";
                    case RadGridStringId.FilterOperatorContains: return "????";
                    case RadGridStringId.FilterFunctionDoesNotContain: return "???? ????"; //Does not contain
                    case RadGridStringId.FilterOperatorDoesNotContain: return "???? ????";
                    case RadGridStringId.FilterFunctionEndsWith: return "????? ????? ??"; //Ends with 
                    case RadGridStringId.FilterOperatorEndsWith: return "????? ????? ??";
                    case RadGridStringId.FilterFunctionEqualTo: return "????? ??"; //Equals     
                    case RadGridStringId.FilterOperatorEqualTo: return "????? ??";
                    case RadGridStringId.FilterFunctionGreaterThan: return "?????? ??"; //Greater than
                    case RadGridStringId.FilterOperatorGreaterThan: return "?????? ??";
                    case RadGridStringId.FilterFunctionGreaterThanOrEqualTo: return "?????? ?? ????? ??"; //Greater than or equal to 
                    case RadGridStringId.FilterOperatorGreaterThanOrEqualTo: return "?????? ?? ????? ??";
                    case RadGridStringId.FilterFunctionIsEmpty: return "???? ????"; //Is empty
                    case RadGridStringId.FilterOperatorIsEmpty: return "???? ????";
                    case RadGridStringId.FilterFunctionIsNull: return "???? null"; //Is null
                    case RadGridStringId.FilterOperatorIsNull: return "???? null";
                    case RadGridStringId.FilterFunctionLessThan: return "???? ??"; //Less than 
                    case RadGridStringId.FilterOperatorLessThan: return "???? ??";
                    case RadGridStringId.FilterFunctionLessThanOrEqualTo: return "???? ?? ????? ??"; //Less than or equal to
                    case RadGridStringId.FilterOperatorLessThanOrEqualTo: return "???? ?? ????? ??";
                    case RadGridStringId.FilterFunctionNoFilter: return "???? ???"; //No filter 
                    case RadGridStringId.FilterOperatorNoFilter: return "???? ???";
                    case RadGridStringId.FilterFunctionNotBetween: return "????? ???"; //Not between
                    case RadGridStringId.FilterOperatorNotBetween: return "????? ???"; //Operator
                    case RadGridStringId.FilterFunctionNotEqualTo: return "????? ????? ??"; //Not equal to 
                    case RadGridStringId.FilterOperatorNotEqualTo: return "????? ????? ??";
                    case RadGridStringId.FilterFunctionNotIsEmpty: return "???? ?????"; //Is not empty          
                    case RadGridStringId.FilterFunctionNotIsNull: return "????? null"; //Is not null         
                    case RadGridStringId.FilterFunctionStartsWith: return "???? ??? ??"; //Starts with          
                    case RadGridStringId.FilterFunctionCustom: return "??? ??????"; //Custom          
                    case RadGridStringId.CustomFilterMenuItem: return "??? ?????? ???"; //Custom         
                    case RadGridStringId.CustomFilterDialogCaption: return "?????? ??? ??????"; //RadGridView Custom Filter Dialog         
                    case RadGridStringId.CustomFilterDialogLabel: return ":???? ???? ??????? ??"; //Show rows where:         
                    case RadGridStringId.CustomFilterDialogRbAnd: return "?"; //And         
                    case RadGridStringId.CustomFilterDialogRbOr: return "??"; //Or          
                    case RadGridStringId.CustomFilterDialogBtnOk: return "?????"; //OK         
                    case RadGridStringId.CustomFilterDialogBtnCancel: return "??????"; //Cancel 
                    case RadGridStringId.AddNewRowString: return "???? ?????? ???? ????? ???? ????";
                    case RadGridStringId.ClearValueMenuItem: return "??? ???? ????? ????";
                    case RadGridStringId.DeleteRowMenuItem: return "??? ???"; //Delete Row          
                    case RadGridStringId.SortAscendingMenuItem: return "???? ???? ?????"; //Sort Ascending         
                    case RadGridStringId.SortDescendingMenuItem: return "???? ???? ?????"; //Sort Descending         
                    case RadGridStringId.ClearSortingMenuItem: return "??? ???? ????"; //Clear Sorting         
                    case RadGridStringId.ConditionalFormattingMenuItem: return "???? ???? ?????"; //Conditional Formatting         
                    case RadGridStringId.GroupByThisColumnMenuItem: return "???????? ?? ??? ??? ????"; //Group by this column         
                    case RadGridStringId.UngroupThisColumn: return "??? ??? ???? ?? ???????? "; //Ungroup this column         
                    case RadGridStringId.ColumnChooserMenuItem: return "???????? ????"; //Column Chooser         
                    case RadGridStringId.HideMenuItem: return "???? ???? ????"; //Hide         
                    case RadGridStringId.UnpinMenuItem: return "???? ??? ???"; //Unpin         
                    case RadGridStringId.PinMenuItem: return "???? ????"; //Pin       
                    case RadGridStringId.PinAtLeftMenuItem: return "?????? ?? ??? ??";
                    case RadGridStringId.PinAtRightMenuItem: return "?????? ?? ??? ????";
                    case RadGridStringId.PinAtTopMenuItem: return "?????? ?? ????";
                    case RadGridStringId.PinAtBottomMenuItem: return "?????? ?? ?????";
                    case RadGridStringId.BestFitMenuItem: return "?????? ????? ????"; //Best Fit         
                    case RadGridStringId.PasteMenuItem: return "???????"; //Paste         
                    case RadGridStringId.EditMenuItem: return "??????"; //Edit         
                    case RadGridStringId.CopyMenuItem: return "???"; //Copy         
                    case RadGridStringId.ConditionalFormattingCaption: return "???? ???? ?????"; //Custom Formatting Condition Editor   
                    case RadGridStringId.ConditionalFormattingLblColumn: return "???? ???? ???????? ?? ???:"; //Column:         
                    case RadGridStringId.ConditionalFormattingLblName: return "??? ???:"; //Name:          
                    case RadGridStringId.ConditionalFormattingLblType: return "????? ????:"; //Type:         
                    case RadGridStringId.ConditionalFormattingLblValue1: return "????? ???:"; //Value 1:         
                    case RadGridStringId.ConditionalFormattingLblValue2: return "????? ???:"; //Value 2:         
                    case RadGridStringId.ConditionalFormattingGrpConditions: return "?????"; //Conditions         
                    case RadGridStringId.ConditionalFormattingGrpProperties: return "??????"; //Properties         
                    case RadGridStringId.ConditionalFormattingChkApplyToRow: return "????? ??? ??? ?? ?? ???"; //Apply to row         
                    case RadGridStringId.ConditionalFormattingBtnAdd: return "?????? ?????"; //Add         
                    case RadGridStringId.ConditionalFormattingBtnRemove: return "??? ????? ???????"; //Remove         
                    case RadGridStringId.ConditionalFormattingBtnOK: return "?????"; //OK         
                    case RadGridStringId.ConditionalFormattingBtnCancel: return "??????"; //Cancel         
                    case RadGridStringId.ConditionalFormattingBtnApply: return "????? ???? ????"; //Apply         
                    case RadGridStringId.ColumnChooserFormCaption: return "?????? ???? ??"; //Column Chooser         
                    case RadGridStringId.ColumnChooserFormMessage: return "???? ??? ??? ?? ??????? ?? ???? ?? ?? ????? ?????";//"Drag a column header from the grid here to remove it from the current view.";
                    case RadGridStringId.CompositeFilterFormErrorCaption: return "???";
                    case RadGridStringId.ConditionalFormattingChooseOne: return "[??? ?? ?????? ????]";
                    case RadGridStringId.ConditionalFormattingContains: return "[???? [????? ???";
                    case RadGridStringId.ConditionalFormattingDoesNotContain: return "???? [????? ???] ?????";
                    case RadGridStringId.ConditionalFormattingEndsWith: return "?? [????? ???] ????? ????";
                    case RadGridStringId.ConditionalFormattingEqualsTo: return "[????? ?? [????? ???";
                    case RadGridStringId.ConditionalFormattingIsBetween: return "??? [????? ???] ? [????? ???] ????";
                    case RadGridStringId.ConditionalFormattingIsGreaterThan: return "[?????? ?? [????? ???";
                    case RadGridStringId.ConditionalFormattingIsGreaterThanOrEqual: return "[?????? ?? ????? ?? [????? ???";
                    case RadGridStringId.ConditionalFormattingIsLessThan: return "?????? ?? [????? ???]";
                    case RadGridStringId.ConditionalFormattingIsLessThanOrEqual: return "?????? ?? ????? ?? [????? ???]";
                    case RadGridStringId.ConditionalFormattingIsNotBetween: return "??? [????? ???] ? [????? ???] ?????";
                    case RadGridStringId.ConditionalFormattingIsNotEqualTo: return "????? ?? [????? ???] ?????";
                    case RadGridStringId.ConditionalFormattingRuleAppliesOn: return "????? ????? ???:";
                    case RadGridStringId.ConditionalFormattingStartsWith: return "?? [????? ???] ???? ?? ???";
                    case RadGridStringId.CustomFilterDialogCheckBoxNot: return "?? ??? ????? ?????";
                    case RadGridStringId.CustomFilterDialogFalse: return "False";
                    case RadGridStringId.CustomFilterDialogTrue: return "True";
                    case RadGridStringId.FilterCompositeNotOperator: return "?????";
                    case RadGridStringId.FilterLogicalOperatorAnd: return "?";
                    case RadGridStringId.FilterLogicalOperatorOr: return "??";
                    case RadGridStringId.FilterMenuAvailableFilters: return "????? ???";
                    case RadGridStringId.FilterMenuButtonCancel: return "??????";
                    case RadGridStringId.FilterMenuButtonOK: return "?????";
                    case RadGridStringId.FilterMenuClearFilters: return "??? ???? ?????";
                    case RadGridStringId.FilterMenuSearchBoxText: return "?????...";
                    case RadGridStringId.FilterMenuSelectionAll: return "???";
                    case RadGridStringId.FilterMenuSelectionAllSearched: return "????? ??? ?????";
                    case RadGridStringId.FilterMenuSelectionNotNull: return "????? null";
                    case RadGridStringId.FilterMenuSelectionNull: return "???? null";
                    case RadGridStringId.FilterOperatorCustom: return "??????";
                    case RadGridStringId.FilterOperatorIsLike: return "?????";
                    case RadGridStringId.FilterOperatorNotIsContainedIn: return "????? ??";
                    case RadGridStringId.FilterOperatorNotIsEmpty: return "???? ?????";
                    case RadGridStringId.FilterOperatorNotIsLike: return "????? ????";
                    case RadGridStringId.FilterOperatorNotIsNull: return "????? null";
                    case RadGridStringId.FilterOperatorStartsWith: return "???? ??? ??";
                    case RadGridStringId.GroupingPanelDefaultMessage: return "???? ???????? ??????? ????? ?? ?? ????? ?????";
                    case RadGridStringId.GroupingPanelHeader: return ":???????? ?? ???";
                    case RadGridStringId.NoDataText: return "???? ?? ???? ????? ???? ?????";
                    case RadGridStringId.UnpinRowMenuItem: return "???? ??? ???";
      
                    default:
                        return base.GetLocalizedString(id);
                }
            }
        }
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 21 Feb 2011 Link to this post

    Hello Hosein,

    Thank you for sharing your Persian localization provider for RadGridView with the community. I have added 3000 Telerik points to your account.

    Best wishes,
    Nikolay
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. maryam
    maryam avatar
    1 posts
    Member since:
    Aug 2011

    Posted 13 Sep 2011 Link to this post

    Hi Hosein,
    May i have your Email address?
    i want to use persian Radscheduler,and i think u can help me.
    thanks

    Maryam
  4. hosein
    hosein avatar
    42 posts
    Member since:
    Oct 2010

    Posted 13 Sep 2011 Link to this post

    Hello
    This my Email address:
        mhs377@yahoo.com

    I will be glad if I could help you in this regard
    Good luck
  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 13 Sep 2011 Link to this post

    Hi guys,

    If you come up with e Persian RadScheduler localization provider, feel free to share it in a new thread. This will earn the creator of this provider the respective amount of Telerik points.

    Regards,
    Nikolay
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top