视频中的文本本地化 [英] Text Localization in Videos

查看:54
本文介绍了视频中的文本本地化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用c#.net来定位视频中的文本...我正在开发一个项目,其目的是从视频中提取文本..所以我必须执行一些步骤,第一步是文本本地化但我不知道如何要做到这一点。

how can i localize text in videos using c# .net..i am developing a project thats purpose is to extract text from videos ..so i have to perform some steps on it first step is text localization but i dont know how to do it.

推荐答案

好的,在考虑视频的情况下我会问你一个问题,你真的知道什么是文本本地化吗?它是如何工作的?

如果没有,那么让我们开始吧(我假设你不知道它)。

1 。将资源文件添加到项目中(您可以将其命名为strings.resx)

2 。在resx文件中添加一个字符串资源并给它一个好名字(例如:将其命名为Hello并将其赋值为Hello)

3。保存资源文件。

现在运行以下代码:

Ok, before considering in case of a video i would ask you a question, do you actually know what is text localization? How it works?
If not,then let's start(i assume you don't know about it).
1. Add a Resource file to your project (you can call it "strings.resx")
2. Add a string resouce in the resx file and give it a good name (example: name it "Hello" with and give it the value "Hello")
3. Save the resource file.
Now run this line of code:
Console.WriteLine(strings.Hello);



它将打印 Hello

现在,添加一个名为strings.fr.resx的新资源文件(注意fr部分;这个将包含法语资源)。添加一个字符串资源,其名称与strings.resx中的名称相同,但值为French(Name =Hello,Value =Salut)。现在,如果你运行以下代码,它应该打印 Salut


It will print "Hello".
Now, add a new resource file, named "strings.fr.resx" (note the "fr" part; this one will contain resources in French). Add a string resource with the same name as in strings.resx, but with the value in French (Name="Hello", Value="Salut"). Now, if you run the following code, it should print Salut:

Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("fr-FR");
Console.WriteLine(strings.Hello);



从这些中获得一些好的知识:

使用C#在Win表单中进行本地化 [ ^ ]

使用C#本地化WPF程序 [ ^ ]


这篇关于视频中的文本本地化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆