"yasin.hallak.89@gmail.com" की गतिविधियाँ

hi

here I want to set defaultLanguage to use it in GenerateViolationReport() method

hi

You can switch the current culture

// get defaultLanguage for this tenant 
var defaultLanguage = await _settingProvider.GetOrNullAsync(LocalizationSettingNames.DefaultLanguage); 
 
// here I want to set defaultLanguage to use it in GenerateViolationReport() method  
 
using (CultureHelper.Use(CultureInfo.GetCultureInfo(defaultLanguage))) 
{ 
    GenerateViolationReport() 
} 

Hi bro .. I am sorry it gave me this error

System.Globalization.CultureNotFoundException: Culture is not supported. (Parameter 'name') ar;ar is an invalid culture identifier.

hi

The LocalizationSettingNames.DefaultLanguage is a setting so you can change via https://docs.abp.io/en/abp/latest/Settings

how I can use it to translate string

https://docs.abp.io/en/abp/latest/Localization

Hi bro ..

this is Excution method for backgrounJob Hangifire

public async Task Excute()
        {
            var tenants = await _tenantRepository.GetListAsync();
            foreach (var tenant in tenants)
            {
               
                using (_currentTenant.Change(tenant.Id))
                {
                    // get defaultLanguage for this tenant
                    var defaultLanguage = await _settingProvider.GetOrNullAsync(LocalizationSettingNames.DefaultLanguage);

                    // here I want to set defaultLanguage to use it in GenerateViolationReport() method 
                    //...
                    //...
                    
                    var absenceAssignmentEmployees = await GetAbsenceAssignmentEmployees();

                    var toBeReported = await GenerateAbsenceReport(absenceAssignmentEmployees);
                    if (toBeReported.Any())
                    {
                        await _absenceRepository.InsertManyAsync(toBeReported, autoSave: true);
                        var absenceIds = toBeReported.Select(absence => absence.Id).ToList();
                        // get absences with related data
                        var absences = await _absenceRepository.GetAbsencesByAbsenceIdsWithDetailsAsync(absenceIds);
                        //TODO EntityLogs

                        var violations = await GenerateViolationReport(absences);
                        if (violations.Any())
                        {
                            await _violationRepository.InsertManyAsync(violations, autoSave: true);
                            //TODO EntityLogs
                        }
                    }
                }
            }
        }

I read this documnet https://docs.abp.io/en/abp/latest/Settings and saw this way :

public class MySettingDefinitionProvider : SettingDefinitionProvider
{
    public override void Define(ISettingDefinitionContext context)
    {
        var smtpHost = context.GetOrNull("Abp.Mailing.Smtp.Host");
        if (smtpHost != null)
        {
            smtpHost.DefaultValue = "mail.mydomain.com";
            smtpHost.DisplayName = 
                new LocalizableString(
                    typeof(MyLocalizationResource),
                    "SmtpServer_DisplayName"
                );
        }
    }
}

but I did not know way to set DefaultLanguage from My code

can you help me Pls ....

Thanx..

var defaultLanguage = await settingProvider.GetOrNullAsync(LocalizationSettingNames.DefaultLanguage);

thanks ... what is the next step ..

how I can set DefaultLanguage in my code

how I can use it to translate string

Hi,

You need to check our migration guide: https://github.com/abpframework/abp/blob/dev/docs/en/Migration-Guides/Abp-6_0.md

Use CLI: switch-to-preview or just change all ABP's NuGet packages version to 6.0.0-rc.2

BTW, I recommend you wait for the 6.0 stable release.

Thanks.. I will wait for V6.0.0 ... but I am asking you Can I Switch from V5.0.0 to V6.0.0 stable directly Or I have to switch from V5.0.0 to V5.3.3 firstly.. then switch to V6.0.0

Change all Microsoft.Extensions.FileProviders.Embedded packages version to 6.0.5

And change the Volo.Payment.Stripe.HttpApi to stable version 5.

haaaa ok ... do you advice me to waiting stable version of V6.0 and directly I can swich from V5.0.0 to V6.0.0 ??

Hi,

It looks like you are using the nightly builds version, you need to switch to stable first: https://docs.abp.io/en/abp/latest/CLI#switch-to-stable

I have switched to stable version 5.3.3 ...

and gave me anther problems as figure below

उत्तर

Update yasinTestWebModule.cs and yasinTest.Web.csproj

it work well thanks ... but I still need to add RedirectAllowedUrls after remove identityServer !!! why ?

उत्तर

liming.ma@volosoft.com

ok I made an invitation for you I am waiting you thanks

उत्तर

but in myProject does not work because when I Installed module "Volo.Account"

Can you share the project that Installed the volo.account liming.ma@volosoft.com

yes I can

https://github.com/----

can you exchange identityServer with default Identity and tell me please

उत्तर

but in myProject does not work because when I Installed module "Volo.Account"

Can you share the project that Installed the volo.account liming.ma@volosoft.com

yes I can

https://github.com/----

83 प्रविष्टियों में 41 से 50 दिखा रहा है
Made with ❤️ on ABP v8.2.0-preview Updated on मार्च 25, 2024, 15:11